├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── nowocode │ │ └── onboardingflow │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── nowocode │ │ │ └── onboardingflow │ │ │ ├── FirstFragment.kt │ │ │ ├── MainActivity.kt │ │ │ └── SecondFragment.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── content_main.xml │ │ ├── fragment_first.xml │ │ └── fragment_second.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.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 │ │ ├── navigation │ │ └── nav_graph.xml │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── nowocode │ └── onboardingflow │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradlew ├── gradlew.bat ├── lib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── nowocode │ │ └── lib │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── nowocode │ │ ├── lib.zip │ │ └── lib │ │ ├── OnboardingManager.kt │ │ ├── OnboardingManagerImpl.kt │ │ └── ui │ │ ├── OnboardingCloseable.kt │ │ ├── OnboardingMessage.kt │ │ ├── OnboardingScaffold.kt │ │ └── model │ │ ├── OnboardingAction.kt │ │ └── VerticalPosition.kt │ └── test │ └── java │ └── com │ └── nowocode │ └── lib │ └── ExampleUnitTest.kt ├── onboardingflow-animation-v1.gif └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # onboardingflow 2 | 3 | Due to the popularity of compose, as it's gonna be the standard for android development anyways, this repository is not maintained anymore 4 | 5 | 6 | 7 | A library that allows you to highlight and describe any visible UI Element to your users.
8 | It is under development but can be already used / tested. The API is quite simple, call from your current Fragment / Activity below code 9 | 10 | ```kotlin 11 | 12 | val viewA: View = //.. any view 13 | OnboardingManager 14 | .instance(requireContext()) 15 | .setActivity(requireActivity()) 16 | .addAction( 17 | OnboardingAction( 18 | view = viewA, 19 | text = "Some description what this view might be used for", 20 | title = "A matching title", 21 | VerticalPosition.BOTTOM // Whether you want the description be displayed below or above the view 22 | ) 23 | ) 24 | .addAction( 25 | ... 26 | ) 27 | // Set an initial fade-in animation 28 | .setFadeIn( 29 | durationInMs = 300L, 30 | fromAlpha = 0f, 31 | toAlpha = 0.7f 32 | ) 33 | // Execute code after user finished the onboarding 34 | .onDone { 35 | myPrefs.onBoardingDone = true 36 | } 37 | // starts the Onboarding flow 38 | .start() 39 | ``` 40 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | } 5 | 6 | android { 7 | compileSdkVersion 30 8 | buildToolsVersion "30.0.2" 9 | 10 | defaultConfig { 11 | applicationId "com.nowocode.onboardingflow" 12 | minSdkVersion 16 13 | targetSdkVersion 30 14 | versionCode 1 15 | versionName "1.0" 16 | 17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 18 | } 19 | 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | compileOptions { 27 | sourceCompatibility JavaVersion.VERSION_1_8 28 | targetCompatibility JavaVersion.VERSION_1_8 29 | } 30 | kotlinOptions { 31 | jvmTarget = '1.8' 32 | } 33 | } 34 | 35 | dependencies { 36 | 37 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 38 | implementation 'androidx.core:core-ktx:1.3.2' 39 | implementation 'androidx.appcompat:appcompat:1.2.0' 40 | implementation 'com.google.android.material:material:1.2.1' 41 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4' 42 | implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1' 43 | implementation 'androidx.navigation:navigation-ui-ktx:2.3.1' 44 | implementation project(path: ':lib') 45 | testImplementation 'junit:junit:4.+' 46 | androidTestImplementation 'androidx.test.ext:junit:1.1.2' 47 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' 48 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/nowocode/onboardingflow/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.nowocode.onboardingflow 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.nowocode.onboardingflow", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/nowocode/onboardingflow/FirstFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nowocode.onboardingflow 2 | 3 | import android.os.Build 4 | import android.os.Bundle 5 | import androidx.fragment.app.Fragment 6 | import android.view.LayoutInflater 7 | import android.view.View 8 | import android.view.ViewGroup 9 | import android.widget.Button 10 | import androidx.annotation.RequiresApi 11 | import androidx.navigation.fragment.findNavController 12 | import com.google.android.material.floatingactionbutton.FloatingActionButton 13 | import com.google.android.material.tabs.TabLayout 14 | import com.nowocode.lib.OnboardingManager 15 | import com.nowocode.lib.ui.model.OnboardingAction 16 | import com.nowocode.lib.ui.model.VerticalPosition 17 | 18 | /** 19 | * A simple [Fragment] subclass as the default destination in the navigation. 20 | */ 21 | class FirstFragment : Fragment() { 22 | 23 | override fun onCreateView( 24 | inflater: LayoutInflater, container: ViewGroup?, 25 | savedInstanceState: Bundle? 26 | ): View? { 27 | // Inflate the layout for this fragment 28 | 29 | return inflater.inflate(R.layout.fragment_first, container, false) 30 | } 31 | 32 | @RequiresApi(Build.VERSION_CODES.LOLLIPOP) 33 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 34 | super.onViewCreated(view, savedInstanceState) 35 | 36 | view.findViewById