cloudroam
2025-04-10 5fc9567cfa6b6beee4f52a9f835f304865d693e1
app/src/main/res/navigation/mobile_navigation.xml
@@ -24,13 +24,6 @@
        android:name="com.example.firstapp.ui.notifications.NotificationsFragment"
        android:label="@string/title_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" />
        <!-- 新增的action,跳转到 ReminderSettingsFragmentOther -->
        <action
@@ -41,27 +34,6 @@
            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" />-->
    <fragment
        android:id="@+id/reminderSettingsFragment"
        android:name="com.example.firstapp.ui.reminder.ReminderSettingsFragment"
        android:label="设置提醒"
        tools:layout="@layout/fragment_reminder_settings">
        <!-- 可以添加 popUpTo 属性来指定返回时的目标 -->
        <action
            android:id="@+id/action_reminderSettings_to_notifications"
            app:popUpTo="@id/navigation_notifications"
            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>