mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-15 19:20:53 -04:00
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
|
||||
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}")
|
||||
}
|
||||
|
||||
// Handle views on fragments
|
||||
navController.addOnDestinationChangedListener { _, navDestination, _ ->
|
||||
when (navDestination.id) {
|
||||
R.id.navigation_apps,
|
||||
R.id.navigation_games,
|
||||
R.id.navigation_updates -> {
|
||||
R.id.appsContainerFragment,
|
||||
R.id.gamesContainerFragment,
|
||||
R.id.updatesFragment -> {
|
||||
B.searchFab.visibility = View.VISIBLE
|
||||
B.navView.visibility = View.VISIBLE
|
||||
B.viewToolbar.root.visibility = View.VISIBLE
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_apps"
|
||||
android:id="@id/appsContainerFragment"
|
||||
android:icon="@drawable/ic_apps"
|
||||
android:title="@string/title_apps" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_games"
|
||||
android:id="@id/gamesContainerFragment"
|
||||
android:icon="@drawable/ic_games"
|
||||
android:title="@string/title_games" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_updates"
|
||||
android:id="@id/updatesFragment"
|
||||
android:icon="@drawable/ic_updates"
|
||||
android:title="@string/title_updates" />
|
||||
|
||||
|
||||
@@ -24,19 +24,17 @@
|
||||
app:startDestination="@id/splashFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_apps"
|
||||
android:id="@+id/appsContainerFragment"
|
||||
android:name="com.aurora.store.view.ui.apps.AppsContainerFragment"
|
||||
android:label="@string/title_apps"
|
||||
tools:layout="@layout/fragment_apps_games" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_games"
|
||||
android:id="@+id/gamesContainerFragment"
|
||||
android:name="com.aurora.store.view.ui.games.GamesContainerFragment"
|
||||
android:label="@string/title_games"
|
||||
tools:layout="@layout/fragment_apps_games" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_updates"
|
||||
android:id="@+id/updatesFragment"
|
||||
android:name="com.aurora.store.view.ui.updates.UpdatesFragment"
|
||||
android:label="@string/title_updates"
|
||||
tools:layout="@layout/fragment_updates" />
|
||||
@@ -240,7 +238,7 @@
|
||||
tools:layout="@layout/fragment_splash" >
|
||||
<action
|
||||
android:id="@+id/action_splashFragment_to_navigation_apps"
|
||||
app:destination="@id/navigation_apps"
|
||||
app:destination="@id/appsContainerFragment"
|
||||
app:launchSingleTop="true"
|
||||
app:popUpTo="@id/mobile_navigation"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
Reference in New Issue
Block a user