├── .gitignore ├── LICENSE ├── README.md ├── art └── img.png ├── build.gradle ├── example ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── meiji │ │ └── setupwizardDemo │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── meiji │ │ │ └── setupwizardDemo │ │ │ ├── FirstActivity.java │ │ │ ├── SecondActivity.java │ │ │ └── ThirdActivity.java │ └── res │ │ ├── drawable-hdpi │ │ └── google.png │ │ ├── drawable-mdpi │ │ └── google.png │ │ ├── drawable-xhdpi │ │ └── google.png │ │ ├── drawable-xxhdpi │ │ └── google.png │ │ ├── drawable-xxxhdpi │ │ ├── bg1.png │ │ ├── bg2.jpg │ │ └── google.png │ │ ├── layout │ │ ├── activity_first.xml │ │ ├── activity_second.xml │ │ └── activity_third.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── meiji │ └── setupwizardDemo │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── setupwizardlib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── java └── com │ └── android │ └── setupwizardlib │ ├── GlifLayout.java │ ├── GlifListLayout.java │ ├── GlifPatternDrawable.java │ ├── SetupWizardItemsLayout.java │ ├── SetupWizardLayout.java │ ├── SetupWizardListLayout.java │ ├── TemplateLayout.java │ ├── annotations │ ├── Keep.java │ └── VisibleForTesting.java │ ├── gesture │ └── ConsecutiveTapsGestureDetector.java │ ├── items │ ├── AbstractItem.java │ ├── AbstractItemHierarchy.java │ ├── ButtonBarItem.java │ ├── ButtonItem.java │ ├── GenericInflater.java │ ├── IItem.java │ ├── Item.java │ ├── ItemAdapter.java │ ├── ItemGroup.java │ ├── ItemHierarchy.java │ └── ItemInflater.java │ ├── span │ ├── LinkSpan.java │ └── SpanHelper.java │ ├── util │ ├── AbstractRequireScrollHelper.java │ ├── DrawableLayoutDirectionHelper.java │ ├── ListViewRequireScrollHelper.java │ ├── Partner.java │ ├── RequireScrollHelper.java │ ├── ResultCodes.java │ ├── SystemBarHelper.java │ └── WizardManagerHelper.java │ └── view │ ├── BottomScrollView.java │ ├── Illustration.java │ ├── IntrinsicSizeFrameLayout.java │ ├── NavigationBar.java │ ├── NavigationBarButton.java │ ├── StatusBarBackgroundLayout.java │ ├── StickyHeaderListView.java │ └── StickyHeaderScrollView.java └── res ├── anim-ldrtl ├── suw_slide_back_in.xml ├── suw_slide_back_out.xml ├── suw_slide_next_in.xml └── suw_slide_next_out.xml ├── anim ├── suw_slide_back_in.xml ├── suw_slide_back_out.xml ├── suw_slide_next_in.xml └── suw_slide_next_out.xml ├── animator-ldrtl-v11 ├── suw_slide_back_in.xml ├── suw_slide_back_out.xml ├── suw_slide_next_in.xml └── suw_slide_next_out.xml ├── animator-v11 ├── suw_slide_back_in.xml ├── suw_slide_back_out.xml ├── suw_slide_next_in.xml └── suw_slide_next_out.xml ├── drawable-anydpi-v21 ├── suw_navbar_ic_back.xml ├── suw_navbar_ic_more.xml └── suw_navbar_ic_next.xml ├── drawable-v21 ├── suw_card_bg.xml └── suw_navbar_btn_bg.xml ├── drawable ├── suw_card_bg_dark.xml ├── suw_card_bg_light.xml ├── suw_layout_background.xml ├── suw_navbar_btn_bg_dark.xml └── suw_navbar_btn_bg_light.xml ├── layout-v21 └── suw_progress_bar.xml ├── layout ├── suw_glif_blank_template_card.xml ├── suw_glif_blank_template_compact.xml ├── suw_glif_header.xml ├── suw_glif_list_template_card.xml ├── suw_glif_list_template_compact.xml ├── suw_glif_list_template_content.xml ├── suw_glif_preference_recycler_view.xml ├── suw_glif_preference_template_header.xml ├── suw_glif_recycler_template_card.xml ├── suw_glif_recycler_template_compact.xml ├── suw_glif_recycler_template_content.xml ├── suw_glif_template_card.xml ├── suw_glif_template_compact.xml ├── suw_glif_template_content.xml ├── suw_items_button_bar.xml ├── suw_items_default.xml ├── suw_items_description.xml ├── suw_items_verbose.xml ├── suw_list_header.xml ├── suw_list_template_card.xml ├── suw_list_template_card_wide.xml ├── suw_list_template_header.xml ├── suw_list_template_header_collapsed.xml ├── suw_navbar_view.xml ├── suw_no_scroll_template_card.xml ├── suw_no_scroll_template_card_wide.xml ├── suw_no_scroll_template_header.xml ├── suw_no_scroll_template_header_collapsed.xml ├── suw_preference_recycler_view_header.xml ├── suw_preference_recycler_view_normal.xml ├── suw_preference_template_header.xml ├── suw_progress_bar_stub.xml ├── suw_recycler_template_card.xml ├── suw_recycler_template_card_wide.xml ├── suw_recycler_template_header.xml ├── suw_recycler_template_header_collapsed.xml ├── suw_template_card.xml ├── suw_template_card_wide.xml ├── suw_template_header.xml └── suw_template_header_collapsed.xml ├── values-af └── strings.xml ├── values-am └── strings.xml ├── values-ar └── strings.xml ├── values-az-rAZ └── strings.xml ├── values-b+sr+Latn └── strings.xml ├── values-be-rBY └── strings.xml ├── values-bg └── strings.xml ├── values-bn-rBD └── strings.xml ├── values-bs-rBA └── strings.xml ├── values-ca └── strings.xml ├── values-cs └── strings.xml ├── values-da └── strings.xml ├── values-de └── strings.xml ├── values-el └── strings.xml ├── values-en-rAU └── strings.xml ├── values-en-rGB └── strings.xml ├── values-en-rIN └── strings.xml ├── values-es-rUS └── strings.xml ├── values-es └── strings.xml ├── values-et-rEE └── strings.xml ├── values-eu-rES └── strings.xml ├── values-fa └── strings.xml ├── values-fi └── strings.xml ├── values-fr-rCA └── strings.xml ├── values-fr └── strings.xml ├── values-gl-rES └── strings.xml ├── values-gu-rIN └── strings.xml ├── values-hi └── strings.xml ├── values-hr └── strings.xml ├── values-hu └── strings.xml ├── values-hy-rAM └── strings.xml ├── values-in └── strings.xml ├── values-is-rIS └── strings.xml ├── values-it └── strings.xml ├── values-iw └── strings.xml ├── values-ja └── strings.xml ├── values-ka-rGE └── strings.xml ├── values-kk-rKZ └── strings.xml ├── values-km-rKH └── strings.xml ├── values-kn-rIN └── strings.xml ├── values-ko └── strings.xml ├── values-ky-rKG └── strings.xml ├── values-land ├── dimens.xml ├── layouts.xml └── styles.xml ├── values-lo-rLA └── strings.xml ├── values-lt └── strings.xml ├── values-lv └── strings.xml ├── values-mk-rMK └── strings.xml ├── values-ml-rIN └── strings.xml ├── values-mn-rMN └── strings.xml ├── values-mr-rIN └── strings.xml ├── values-ms-rMY └── strings.xml ├── values-my-rMM └── strings.xml ├── values-nb └── strings.xml ├── values-ne-rNP └── strings.xml ├── values-nl └── strings.xml ├── values-pa-rIN └── strings.xml ├── values-pl └── strings.xml ├── values-pt-rBR └── strings.xml ├── values-pt-rPT └── strings.xml ├── values-pt └── strings.xml ├── values-ro └── strings.xml ├── values-ru └── strings.xml ├── values-si-rLK └── strings.xml ├── values-sk └── strings.xml ├── values-sl └── strings.xml ├── values-sq-rAL └── strings.xml ├── values-sr └── strings.xml ├── values-sv └── strings.xml ├── values-sw └── strings.xml ├── values-sw360dp └── dimens.xml ├── values-sw600dp-land ├── dimens.xml └── layouts.xml ├── values-sw600dp ├── config.xml ├── dimens.xml └── layouts.xml ├── values-ta-rIN └── strings.xml ├── values-te-rIN └── strings.xml ├── values-th └── strings.xml ├── values-tl └── strings.xml ├── values-tr └── strings.xml ├── values-uk └── strings.xml ├── values-ur-rPK └── strings.xml ├── values-uz-rUZ └── strings.xml ├── values-v21 ├── styles.xml └── themes.xml ├── values-vi └── strings.xml ├── values-zh-rCN └── strings.xml ├── values-zh-rHK └── strings.xml ├── values-zh-rTW └── strings.xml ├── values-zu └── strings.xml └── values ├── attrs.xml ├── colors.xml ├── config.xml ├── dimens.xml ├── layouts.xml ├── strings.xml ├── styles.xml └── themes.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | *.log 10 | -------------------------------------------------------------------------------- /art/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/art/img.png -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.0.1' 10 | classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } 27 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /example/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | buildToolsVersion '27.0.3' 6 | defaultConfig { 7 | applicationId "com.meiji.setupwizardlib.example" 8 | minSdkVersion 21 9 | targetSdkVersion 27 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | productFlavors { 21 | } 22 | } 23 | 24 | dependencies { 25 | compile fileTree(include: ['*.jar'], dir: 'libs') 26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 27 | exclude group: 'com.android.support', module: 'support-annotations' 28 | }) 29 | compile 'com.android.support:appcompat-v7:27.1.0' 30 | compile 'com.android.support:design:27.1.0' 31 | testCompile 'junit:junit:4.12' 32 | compile project(':setupwizardlib') 33 | } 34 | -------------------------------------------------------------------------------- /example/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 D:\Users\Meiji\AppData\Local\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 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /example/src/androidTest/java/com/meiji/setupwizardDemo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.meiji.setupwizardDemo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.assertEquals; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.meiji.test2", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /example/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /example/src/main/java/com/meiji/setupwizardDemo/FirstActivity.java: -------------------------------------------------------------------------------- 1 | package com.meiji.setupwizardDemo; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.app.AppCompatActivity; 7 | 8 | import com.android.setupwizardlib.SetupWizardLayout; 9 | import com.android.setupwizardlib.view.NavigationBar; 10 | 11 | /** 12 | * Created by Meiji on 2017/9/9. 13 | */ 14 | 15 | public class FirstActivity extends AppCompatActivity { 16 | 17 | SetupWizardLayout layout; 18 | 19 | @Override 20 | protected void onCreate(@Nullable Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_first); 23 | layout = findViewById(R.id.setup); 24 | 25 | layout.setHeaderText("Tap & Go"); 26 | layout.setIllustration(getResources().getDrawable(R.drawable.bg1)); 27 | layout.setIllustrationAspectRatio(4f); 28 | layout.getNavigationBar().setNavigationBarListener(new NavigationBar.NavigationBarListener() { 29 | @Override 30 | public void onNavigateBack() { 31 | onBackPressed(); 32 | } 33 | 34 | @Override 35 | public void onNavigateNext() { 36 | startActivity(new Intent(FirstActivity.this, SecondActivity.class)); 37 | } 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /example/src/main/java/com/meiji/setupwizardDemo/SecondActivity.java: -------------------------------------------------------------------------------- 1 | package com.meiji.setupwizardDemo; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.widget.ScrollView; 7 | 8 | import com.android.setupwizardlib.SetupWizardLayout; 9 | import com.android.setupwizardlib.view.NavigationBar; 10 | 11 | public class SecondActivity extends AppCompatActivity { 12 | 13 | SetupWizardLayout layout; 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_second); 19 | layout = findViewById(R.id.setup); 20 | 21 | layout.setHeaderText("Add your account"); 22 | layout.setIllustrationAspectRatio(4f); 23 | 24 | final ScrollView scrollView = layout.getScrollView(); 25 | 26 | layout.getNavigationBar().setNavigationBarListener(new NavigationBar.NavigationBarListener() { 27 | @Override 28 | public void onNavigateBack() { 29 | onBackPressed(); 30 | } 31 | 32 | @Override 33 | public void onNavigateNext() { 34 | if (scrollView != null) { 35 | if (scrollView.getChildAt(0).getBottom() <= (scrollView.getHeight() + scrollView.getScrollY())) { 36 | //scroll view is at bottom 37 | startActivity(new Intent(SecondActivity.this, ThirdActivity.class)); 38 | } else { 39 | //scroll view is not at bottom 40 | scrollView.fullScroll(ScrollView.FOCUS_DOWN); 41 | 42 | } 43 | } 44 | } 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example/src/main/java/com/meiji/setupwizardDemo/ThirdActivity.java: -------------------------------------------------------------------------------- 1 | package com.meiji.setupwizardDemo; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.widget.ArrayAdapter; 8 | 9 | import com.android.setupwizardlib.SetupWizardListLayout; 10 | import com.android.setupwizardlib.view.NavigationBar; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | /** 16 | * Created by Meiji on 2017/9/9. 17 | */ 18 | 19 | public class ThirdActivity extends AppCompatActivity { 20 | 21 | SetupWizardListLayout layout; 22 | Integer[] integers = {0, 1, 2, 3, 4, 5, 6, 7}; 23 | List items = Arrays.asList(integers); 24 | 25 | @Override 26 | protected void onCreate(@Nullable Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | setContentView(R.layout.activity_third); 29 | layout = findViewById(R.id.setup); 30 | 31 | ArrayAdapter itemsAdapter = 32 | new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, items); 33 | layout.setAdapter(itemsAdapter); 34 | layout.setHeaderText("SetupWizardListLayout"); 35 | layout.setIllustration(getResources().getDrawable(R.drawable.bg2)); 36 | layout.setIllustrationAspectRatio(4f); 37 | layout.getNavigationBar().setNavigationBarListener(new NavigationBar.NavigationBarListener() { 38 | @Override 39 | public void onNavigateBack() { 40 | onBackPressed(); 41 | } 42 | 43 | @Override 44 | public void onNavigateNext() { 45 | startActivity(new Intent(ThirdActivity.this, SecondActivity.class)); 46 | } 47 | }); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-hdpi/google.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-mdpi/google.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-xhdpi/google.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-xxhdpi/google.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-xxxhdpi/bg1.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-xxxhdpi/bg2.jpg -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iMeiji/SetupWizardLayout/50865a53fe5d765325ceb0f084127bd0143a4d6f/example/src/main/res/drawable-xxxhdpi/google.png -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_second.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 22 | 23 | 29 | 30 | 31 | 40 | 41 | 42 |