Questions tagged [navigation-architecture]

35 questions
2
votes
1 answer

Completely restart android app including application class

I want to restart the application after the user changes language within the application. I'm starting new intent for MainActivity or as another solution I tried activity.recreate() methods but fragments are not initialized when restarting…
2
votes
2 answers

Deep link support in android

We are trying to support implicit deep links in our app. The app uses navigation architecture components with bottom navigation tabs. I want to understand, if its possible to dynamically re route to a particular screen of the android app by writing…
2
votes
1 answer

Adding fragment manually into the backstack in Navigation Architecture Component

I am having 4 fragments in Navigation Graph, Named A, B, C, D, On which i am getting some data from the user. When i an in a normal flow (A->B->C->D) and press back button everything(back-stack) working fine. But i have a case in which i have and…
2
votes
0 answers

Cannot call onResume/onPause when using navigation with dialog(BottomSheetDialogFragment)

Sorry if the naming is bad, but, there are too many things, so had to change the names. But I am having an issue with navigation. I have a nav_graph as following.
2
votes
2 answers

Android Navigation Component - Setting HasOptionsMenu invalidates NavigateUp button

I'm using Android Navigation Component with a bottomNavigationView. I have configured the AppBar in my MainActivity so that a Navigate Up Button appears when the app is not on the start destination of the graph. I have set SupportedActionBar and…
2
votes
0 answers

Navigate up without reloading the fragment with Navigation Architecture

I want to go to previous fragment destination when back button is clicke. I have different fragments created for bottom navigation pages with viewpager. here's the code I use currently for the navHost Activity @Override public void…
1
vote
1 answer

Deep link navigating to parent activity does not work with navigation architecture component explicit deep link

I have a profile activity and MainActivity which is the parent of Profile Activity. I have a common activity with no ui to handle deep links re-direction using explicit deep links Manifest file
1
vote
3 answers

Navigation Architecture Component - OnBackPressed() - Android

I progress in fragments with the Android navigation architecture. When I press the key on the last screen or when I put a button on the screen and set the button function as val navıgattor =…
1
vote
0 answers

NavHostFragment error inflating class fragment when screen is rotated

I'm creating an application where it uses the Navigation Architecture, but my navigation has no default host, and can be set based on the selected destination by the user. So this is the setup of my NavHostFragment override fun…
dotGitignore
  • 1,597
  • 2
  • 15
  • 34
1
vote
1 answer

How should I handle Navigation within ViewPager Fragment with Navigation Architecture Components, and Single Activity Approach

Here is my Single Activity Approach: MainActivity has the NavHost MainFragment with AppBarLayout, TabLayout, ViewPager, etc. MainFragment Has 2 (or more) Fragments within ViewPager -> { CustomerListFragment -> will navigate to…
0
votes
0 answers

error: package R does not exist return R.id.action_fragment_a_to_fragment_b navigation-args after upgrading to AGP 7.2 android studio

After i upgrade to AGP 7.2 i got below error R does not exist return R.id.action_fragment_a_to_fragment_b How can i be able to solve this problem i have tried Build Clean Project and Build Rebuild Project but its not working, i have also tried…
0
votes
1 answer

Android Jetpack Navigation Component - Back button closes the Searchview instead of navigating to previous screen

I am using the Android Jetpack Navigation Component for navigating between fragments back and forth. On one Fragment, I have a SearchView in expanded form. When I press the back button (to the left of the SearchView), then the following…
0
votes
1 answer

launch a fragment with result using navigation architecture components

Below is how i am navigating from fragment A to fragment B using android navigation @Override public void onClick(View view) { int viewId = view.getId(); if (viewId == R.id.btn_proceed) { …
0
votes
1 answer

Why not work back button with android navigation component

this my Auth Activity class AuthActivity : AppCompatActivity() { private lateinit var navController: NavController override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val binding =…
Pejman Azad
  • 165
  • 1
  • 11
0
votes
1 answer

Android Navigation Component 'global action'' issue

In some project we use Navigation Architecture Component, in navigation graph we added Fragment with global action, but issue is when quickly click multiple times on button after which navigate to Fragment - Fragment opens multiple times. I have…
kovac777
  • 730
  • 6
  • 19