All Projects → zawadz88 → NavigationComponentPlayground

zawadz88 / NavigationComponentPlayground

Licence: other
Sample app leveraging Android Navigation Component

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to NavigationComponentPlayground

helloworld
Boilerplate code for basic architecture of an android application following MVVM pattern using hilt, RxJava2.
Stars: ✭ 26 (-56.67%)
Mutual labels:  navigation-architecture-component, navigation-component
modern-android
Modern Android Project Skeleton
Stars: ✭ 17 (-71.67%)
Mutual labels:  android-navigation, androidx
Smooth-Navigation
提供流畅的 Jetpack Navigation 转场体验。并解决 GitHub 上 Navigation Add Hide 修改版普遍存在的致命缺陷。
Stars: ✭ 204 (+240%)
Mutual labels:  navigation-architecture-component, navigation-component
navigation-component
Android navigation component examples
Stars: ✭ 22 (-63.33%)
Mutual labels:  android-navigation-component, navigation-component
bye-bye-jetifier
Gradle Plugin to verify if you can keep Android Jetifier disabled
Stars: ✭ 173 (+188.33%)
Mutual labels:  androidx
Nit Talk
Group Messaging Chat (Discord Clone 👀) App Using Firebase Cloud-Firestore following MVVM Architecture
Stars: ✭ 27 (-55%)
Mutual labels:  navigation-architecture-component
BooksApp
Book selling application with MVVM (Model, View, ViewModel), LiveData, DataBinding, Retrofit, Room Database, Navigation Component(NavGraph, BottomNav), ViewPager2 in TabLayout, SearchView, Vertical Adapter(BestSellers) and Horizontal Adapter(All Books) with ConcatAdapter for Main Screen, Firebase Auth, SearchView in Adapter, Picasso, Lottie, Ani…
Stars: ✭ 53 (-11.67%)
Mutual labels:  navigation-component
Clean-MVVM-NewsApp
Android News app developed using Clean + MVVM architecture
Stars: ✭ 52 (-13.33%)
Mutual labels:  androidx
MVI-Clean-Architecture
MVI + Clean Architecture + Best Practices | Example of Clean Architecture of Android app using MVI design pattern with Jetpack and popular libraries
Stars: ✭ 50 (-16.67%)
Mutual labels:  navigation-component
DailyBugle
📰Modern MVVM Android application following single activity architecture which fetches news from 🕷️ news API. this repository contains some best practices ⚡ of android development
Stars: ✭ 17 (-71.67%)
Mutual labels:  navigation-component
RePluginX
🔥 Supports AndroidX and Android-Support
Stars: ✭ 32 (-46.67%)
Mutual labels:  androidx
JADA
JADA - Just Another Dictionary App
Stars: ✭ 20 (-66.67%)
Mutual labels:  navigation-architecture-component
WanAndroid
wanandroid的Kotlin版,采用Android X
Stars: ✭ 20 (-66.67%)
Mutual labels:  androidx
Newsster
Android App using Paging3, Hilt, Coroutines, Flow, Jetpack, MVVM architecture.
Stars: ✭ 147 (+145%)
Mutual labels:  navigation-component
Dads
*BA DUM TSSS*
Stars: ✭ 240 (+300%)
Mutual labels:  androidx
Android-Assignment
This assignment gives you basically a post list and its detail with comments.🚀
Stars: ✭ 32 (-46.67%)
Mutual labels:  navigation-architecture-component
Biometric-Authentication-Android
A sample implementation of AndroidX biometrics API using Kotlin. Authenticate using biometrics or PIN/Password if biometrics isn't available on device. Fully implemented in Jetpack compose using Material 3 dynamic theming and also has a separate implementation in xml with MDC 3.
Stars: ✭ 29 (-51.67%)
Mutual labels:  androidx
MovieDb
No description or website provided.
Stars: ✭ 34 (-43.33%)
Mutual labels:  navigation-component
Simple-Notes-Kotlin-App
✍️ Simple Note Making App use mvvm architecture , dagger , coroutines and navigation component. Features includes 🗒️ create , edit and ❌ delete notes
Stars: ✭ 40 (-33.33%)
Mutual labels:  navigation-component
hat-view
Allow to put "hat" on TextView. Inspired by Telegram appbar title with Santa Claus hat 🎅🏻
Stars: ✭ 51 (-15%)
Mutual labels:  androidx

Navigation Component Playground

This is a sample project where I experimented with different aspects of the Android Navigation Component.

What's implemented?

  • single Activity with Fragments
  • navigation graph in XML
  • handling of notifications (explicit deep links)
  • custom handling of implicit deep links (more on that later)
  • passing arguments between Fragments via Safe Args
  • starting Fragments for result and waiting for that result (similar to Activity's startActivityForResult and onActivityResult)
  • transitions between fragments with shared Toolbar
  • a simple Toolbar navigation icon morphing ("<-" -> "X")
  • base Dagger setup with a FragmentFactory used to create Fragments with non-default constructors

There's no MVP/MVVM/MVI here - just the Navigation Component to make the sample simple.

How does it look like?

App

Graph

What's custom in deep link handling?

Normally deep links would clear the entire back stack and start fresh. There are some differences between explicit and implicit deep links as well whether Intent.FLAG_ACTIVITY_NEW_TASK was provided or not.

In the sample app, regardless of Intent.FLAG_ACTIVITY_NEW_TASK I wanted to show the Fragment on top of the existing stack if the app was in the background or and start a new stack only if it was killed.

Also, this deep link when opened would pop specific Fragments from the back stack.

Handling Fragments results

My approach is based on Using Navigation Architecture Component in a large banking app article with some tweaks added to be able to pop the back stack further than the previous screen e.g. 2 screens back.

In the sample app this happens when e.g. we have the following stack:

Offer Fragment --> Collective login Fragment -> Login with password Fragment

Now, what we would like to do is go back to Offer Fragment and in there handle this result and e.g. start Apply Fragment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].