Rename top fragments id to reflect their classname
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -165,16 +165,16 @@ class MainActivity : AppCompatActivity(), NetworkProvider.NetworkListener {
|
|||||||
|
|
||||||
// Handle intents
|
// Handle intents
|
||||||
when (intent?.action) {
|
when (intent?.action) {
|
||||||
Constants.NAVIGATION_UPDATES -> B.navView.selectedItemId = R.id.navigation_updates
|
Constants.NAVIGATION_UPDATES -> B.navView.selectedItemId = R.id.updatesFragment
|
||||||
else -> Log.i("Unhandled intent action: ${intent.action}")
|
else -> Log.i("Unhandled intent action: ${intent.action}")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle views on fragments
|
// Handle views on fragments
|
||||||
navController.addOnDestinationChangedListener { _, navDestination, _ ->
|
navController.addOnDestinationChangedListener { _, navDestination, _ ->
|
||||||
when (navDestination.id) {
|
when (navDestination.id) {
|
||||||
R.id.navigation_apps,
|
R.id.appsContainerFragment,
|
||||||
R.id.navigation_games,
|
R.id.gamesContainerFragment,
|
||||||
R.id.navigation_updates -> {
|
R.id.updatesFragment -> {
|
||||||
B.searchFab.visibility = View.VISIBLE
|
B.searchFab.visibility = View.VISIBLE
|
||||||
B.navView.visibility = View.VISIBLE
|
B.navView.visibility = View.VISIBLE
|
||||||
B.viewToolbar.root.visibility = View.VISIBLE
|
B.viewToolbar.root.visibility = View.VISIBLE
|
||||||
|
|||||||
@@ -20,17 +20,17 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_apps"
|
android:id="@id/appsContainerFragment"
|
||||||
android:icon="@drawable/ic_apps"
|
android:icon="@drawable/ic_apps"
|
||||||
android:title="@string/title_apps" />
|
android:title="@string/title_apps" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_games"
|
android:id="@id/gamesContainerFragment"
|
||||||
android:icon="@drawable/ic_games"
|
android:icon="@drawable/ic_games"
|
||||||
android:title="@string/title_games" />
|
android:title="@string/title_games" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_updates"
|
android:id="@id/updatesFragment"
|
||||||
android:icon="@drawable/ic_updates"
|
android:icon="@drawable/ic_updates"
|
||||||
android:title="@string/title_updates" />
|
android:title="@string/title_updates" />
|
||||||
|
|
||||||
|
|||||||
@@ -24,19 +24,17 @@
|
|||||||
app:startDestination="@id/splashFragment">
|
app:startDestination="@id/splashFragment">
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_apps"
|
android:id="@+id/appsContainerFragment"
|
||||||
android:name="com.aurora.store.view.ui.apps.AppsContainerFragment"
|
android:name="com.aurora.store.view.ui.apps.AppsContainerFragment"
|
||||||
android:label="@string/title_apps"
|
android:label="@string/title_apps"
|
||||||
tools:layout="@layout/fragment_apps_games" />
|
tools:layout="@layout/fragment_apps_games" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_games"
|
android:id="@+id/gamesContainerFragment"
|
||||||
android:name="com.aurora.store.view.ui.games.GamesContainerFragment"
|
android:name="com.aurora.store.view.ui.games.GamesContainerFragment"
|
||||||
android:label="@string/title_games"
|
android:label="@string/title_games"
|
||||||
tools:layout="@layout/fragment_apps_games" />
|
tools:layout="@layout/fragment_apps_games" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_updates"
|
android:id="@+id/updatesFragment"
|
||||||
android:name="com.aurora.store.view.ui.updates.UpdatesFragment"
|
android:name="com.aurora.store.view.ui.updates.UpdatesFragment"
|
||||||
android:label="@string/title_updates"
|
android:label="@string/title_updates"
|
||||||
tools:layout="@layout/fragment_updates" />
|
tools:layout="@layout/fragment_updates" />
|
||||||
@@ -240,7 +238,7 @@
|
|||||||
tools:layout="@layout/fragment_splash" >
|
tools:layout="@layout/fragment_splash" >
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_splashFragment_to_navigation_apps"
|
android:id="@+id/action_splashFragment_to_navigation_apps"
|
||||||
app:destination="@id/navigation_apps"
|
app:destination="@id/appsContainerFragment"
|
||||||
app:launchSingleTop="true"
|
app:launchSingleTop="true"
|
||||||
app:popUpTo="@id/mobile_navigation"
|
app:popUpTo="@id/mobile_navigation"
|
||||||
app:popUpToInclusive="true" />
|
app:popUpToInclusive="true" />
|
||||||
|
|||||||
Reference in New Issue
Block a user