├── sample ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ ├── side_nav_bar.xml │ │ │ │ ├── ic_menu.xml │ │ │ │ └── ic_more_vert.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── drawables.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-v21 │ │ │ │ ├── ic_menu_send.xml │ │ │ │ ├── ic_menu_slideshow.xml │ │ │ │ ├── ic_menu_gallery.xml │ │ │ │ ├── ic_menu_manage.xml │ │ │ │ ├── ic_menu_camera.xml │ │ │ │ └── ic_menu_share.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── nav_header_main.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ ├── activity_dialog_style.xml │ │ │ │ └── content_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── samuelwall │ │ │ └── materialtaptargetprompt │ │ │ └── sample │ │ │ ├── DialogStyleActivity.java │ │ │ └── MainActivity.java │ └── test │ │ └── java │ │ └── uk │ │ └── co │ │ └── samuelwall │ │ └── materialtaptargetprompt │ │ └── sample │ │ └── SampleUnitTest.java ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── proguard-rules.pro ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ └── values │ │ │ │ └── attrs.xml │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── samuelwall │ │ │ └── materialtaptargetprompt │ │ │ └── MaterialTapTargetPrompt.java │ └── test │ │ └── java │ │ └── uk │ │ └── co │ │ └── samuelwall │ │ └── materialtaptargetprompt │ │ └── MaterialTapTargetPromptUnitTest.java └── build.gradle ├── .idea ├── .name ├── copyright │ ├── profiles_settings.xml │ └── Material_Tap_Target_Prompt.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .travis.yml ├── settings.gradle ├── CHANGELOG.md ├── gradle.properties ├── art ├── app_banner.svg └── app_icon.svg ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | MaterialTapTargetPrompt -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | android: 3 | components: 4 | - tools 5 | - build-tools-23.0.3 6 | - android-23 7 | - extra 8 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angebagui/MaterialTapTargetPrompt/master/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/sam/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/sam/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Samuel Wall 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | include ':library', ':sample' 18 | 19 | project(':library').name = 'material-tap-target-prompt' 20 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/copyright/Material_Tap_Target_Prompt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Samuel Wall 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #Mon Dec 28 10:00:20 PST 2015 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | zipStoreBase=GRADLE_USER_HOME 21 | zipStorePath=wrapper/dists 22 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 23 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ## v1.1.4 (2016-08-21) 6 | 7 | ### Bug Fixes 8 | 9 | * Fixed prompt view position not changing on target view position change 10 | * Fixed null pointer exception in Builder.show when create returns null 11 | 12 | ## v1.1.3 (2016-06-26) 13 | 14 | ### Bug Fixes 15 | 16 | * Fixed crash if secondary text not set 17 | * Fixed incorrectly named method getTextSeparation, renamed to setTextSeparation 18 | 19 | ## v1.1.2 (2016-06-20) 20 | 21 | ### Bug Fixes 22 | 23 | * Fixed incorrect text positioning when view is clipped 24 | 25 | ## v1.1.1 (2016-06-13) 26 | 27 | ### Bug Fixes 28 | 29 | * Fixed incorrect margin use 30 | 31 | ## v1.1.0 (2016-06-12) 32 | 33 | ### Features 34 | 35 | * Added loading prompt theme from style 36 | 37 | ### Bug Fixes 38 | 39 | * Fixed prompt being drawn outside activity bounds 40 | 41 | ## v1.0.0 (2016-06-05) 42 | 43 | * Initial release 44 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #3F51B5 20 | #303F9F 21 | #FF4081 22 | 23 | #68EFAD 24 | #FFCC80 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/test/java/uk/co/samuelwall/materialtaptargetprompt/sample/SampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Samuel Wall 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.samuelwall.materialtaptargetprompt.sample; 18 | 19 | import org.junit.Test; 20 | 21 | import static junit.framework.Assert.assertEquals; 22 | 23 | public class SampleUnitTest 24 | { 25 | @Test 26 | public void addition_isCorrect() throws Exception 27 | { 28 | assertEquals(4, 2 + 2); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/ic_menu.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 21 | 64dp 22 | 23 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/ic_more_vert.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 16dp 20 | 160dp 21 | 22 | 16dp 23 | 16dp 24 | 16dp 25 | 350dp 26 | 27 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /sample/src/main/res/values/drawables.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | @android:drawable/ic_menu_camera 19 | @android:drawable/ic_menu_gallery 20 | @android:drawable/ic_menu_slideshow 21 | @android:drawable/ic_menu_manage 22 | @android:drawable/ic_menu_share 23 | @android:drawable/ic_menu_send 24 | 25 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable-v21/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | Material Tap Target Prompt Sample 19 | 20 | Open navigation drawer 21 | Close navigation drawer 22 | 23 | Settings 24 | 25 | Just how you want it 26 | Tap the menu icon to switch accounts, change settings & more 27 | Search your emails 28 | Tap the icon to quickly scan your emails 29 | 30 | Loaded from style 31 | This was loaded from a style 32 | 33 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Samuel Wall 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Project-wide Gradle settings. 18 | 19 | # IDE (e.g. Android Studio) users: 20 | # Gradle settings configured through the IDE *will override* 21 | # any settings specified in this file. 22 | 23 | # For more details on how to configure your build environment visit 24 | # http://www.gradle.org/docs/current/userguide/build_environment.html 25 | 26 | # Specifies the JVM arguments used for the daemon process. 27 | # The setting is particularly useful for tweaking memory settings. 28 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 29 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 30 | 31 | # When configured, Gradle will run in incubating parallel mode. 32 | # This option should only be used with decoupled projects. More details, visit 33 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 34 | # org.gradle.parallel=true 35 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Samuel Wall 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | android { 20 | compileSdkVersion 23 21 | buildToolsVersion "23.0.3" 22 | 23 | defaultConfig { 24 | applicationId "uk.co.samuelwall.materialtaptargetprompt.sample" 25 | minSdkVersion 7 26 | targetSdkVersion 23 27 | versionCode 6 28 | versionName "1.1.4" 29 | } 30 | buildTypes { 31 | release { 32 | minifyEnabled false 33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 34 | } 35 | } 36 | lintOptions { 37 | abortOnError false 38 | } 39 | } 40 | 41 | dependencies { 42 | compile fileTree(dir: 'libs', include: ['*.jar']) 43 | testCompile 'junit:junit:4.12' 44 | compile 'com.android.support:appcompat-v7:23.4.0' 45 | compile 'com.android.support:support-v4:23.4.0' 46 | compile 'com.android.support:design:23.4.0' 47 | compile project(':material-tap-target-prompt') 48 | } 49 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 26 | 27 | 31 | 32 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /sample/src/main/java/uk/co/samuelwall/materialtaptargetprompt/sample/DialogStyleActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Samuel Wall 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.samuelwall.materialtaptargetprompt.sample; 18 | 19 | import android.os.Bundle; 20 | import android.support.v4.view.animation.FastOutSlowInInterpolator; 21 | import android.support.v7.app.AppCompatActivity; 22 | import android.support.v7.widget.Toolbar; 23 | import android.view.View; 24 | 25 | import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt; 26 | 27 | public class DialogStyleActivity extends AppCompatActivity 28 | { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) 32 | { 33 | super.onCreate(savedInstanceState); 34 | setContentView(R.layout.activity_dialog_style); 35 | 36 | final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 37 | setSupportActionBar(toolbar); 38 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 39 | } 40 | 41 | public void showPrompt(View view) 42 | { 43 | new MaterialTapTargetPrompt.Builder(this) 44 | .setTarget(R.id.fab) 45 | .setAnimationInterpolator(new FastOutSlowInInterpolator()) 46 | .setPrimaryText("Clipped to activity bounds") 47 | .setSecondaryText("The prompt does not draw outside the activity") 48 | .show(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 25 | 29 | 33 | 37 | 38 | 39 | 40 | 41 | 45 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/nav_header_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 29 | 30 | 36 | 37 | 43 | 44 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /library/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_dialog_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 29 | 30 | 34 | 35 | 41 | 42 | 43 | 44 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /art/app_banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 51 | 58 | 64 | 70 | 77 | 84 | 85 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Material Tap Target Prompt 2 | [![Build Status](https://travis-ci.org/sjwall/MaterialTapTargetPrompt.svg?branch=master)](https://travis-ci.org/sjwall/MaterialTapTargetPrompt) 3 | [![Download](https://api.bintray.com/packages/sjwall/maven/material-tap-target-prompt/images/download.svg)](https://bintray.com/sjwall/maven/material-tap-target-prompt/_latestVersion) 4 | 5 | A Tap Target implementation in Android based on Material Design Onboarding guidelines. For more information on tap targets check out the [guidelines][1]. 6 | 7 | ![Example](http://i.imgur.com/Ei7iAcn.png?1) 8 | 9 | # Sample App 10 | The sample app in the repository is available on Google Play: 11 | 12 | Get it on Google Play 13 | 14 | # Gradle 15 | To use the gradle dependency, add this to build.gradle: 16 | ```groovy 17 | repositories { 18 | jcenter() 19 | } 20 | 21 | dependencies { 22 | compile 'uk.co.samuelwall:material-tap-target-prompt:1.1.4' 23 | } 24 | ``` 25 | 26 | # Usage 27 | Basic usage is shown below with more examples in the sample app: 28 | 29 | ```java 30 | new MaterialTapTargetPrompt.Builder(MainActivity.this) 31 | .setTarget(findViewById(R.id.fab)) 32 | .setPrimaryText("Send your first email") 33 | .setSecondaryText("Tap the envelop to start composing your first email") 34 | .setOnHidePromptListener(new MaterialTapTargetPrompt.OnHidePromptListener() 35 | { 36 | @Override 37 | public void onHidePrompt(MotionEvent event, boolean tappedTarget) 38 | { 39 | //Do something such as storing a value so that this prompt is never shown again 40 | } 41 | 42 | @Override 43 | public void onHidePromptComplete() 44 | { 45 | 46 | } 47 | }) 48 | .show(); 49 | ``` 50 | 51 | # License 52 | Copyright (C) 2016 Samuel Wall 53 | 54 | Licensed under the Apache License, Version 2.0 (the "License"); 55 | you may not use this file except in compliance with the License. 56 | You may obtain a copy of the License at 57 | 58 | http://www.apache.org/licenses/LICENSE-2.0 59 | 60 | Unless required by applicable law or agreed to in writing, software 61 | distributed under the License is distributed on an "AS IS" BASIS, 62 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 63 | See the License for the specific language governing permissions and 64 | limitations under the License. 65 | 66 | 67 | 68 | 69 | [1]: https://www.google.com/design/spec/growth-communications/feature-discovery.html#feature-discovery-design 70 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 32 | 33 | 45 | 46 | 53 | 54 | 55 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 30 | 31 |