cloudroam
2025-02-26 b653b90d4598ee2a65bceffa793bb75353b6d186
app/src/main/res/navigation/mobile_navigation.xml
@@ -5,6 +5,8 @@
    android:id="@+id/mobile_navigation"
    app:startDestination="@+id/navigation_home">
    <!--    对应的多个片段-->
    <!--    tools:layout="@layout/fragment_home"表示设计视图中显示的应该是fragment_home.xml的内容,而不是当前布局的内容-->
    <fragment
        android:id="@+id/navigation_home"
        android:name="com.example.firstapp.ui.home.HomeFragment"
@@ -21,5 +23,19 @@
        android:id="@+id/navigation_notifications"
        android:name="com.example.firstapp.ui.notifications.NotificationsFragment"
        android:label="@string/title_notifications"
        tools:layout="@layout/fragment_notifications" />
        tools:layout="@layout/fragment_notifications" >
        <action
            android:id="@+id/action_navigation_notifications_to_reminderSettingsFragment"
            app:destination="@id/reminderSettingsFragment"
            app:enterAnim="@anim/nav_default_enter_anim"
            app:exitAnim="@anim/nav_default_exit_anim"
            app:popEnterAnim="@anim/nav_default_pop_enter_anim"
            app:popExitAnim="@anim/nav_default_pop_exit_anim" />
    </fragment>
    <fragment
        android:id="@+id/reminderSettingsFragment"
        android:name="com.example.firstapp.ui.reminder.ReminderSettingsFragment"
        android:label="设置提醒"
        tools:layout="@layout/fragment_reminder_settings" />
</navigation>