1
0
Fork 0
fenix/app/src/main/res/navigation/nav_graph.xml

76 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
app:startDestination="@id/homeFragment">
<action
android:id="@+id/action_global_browser"
app:destination="@id/browserFragment" />
<fragment
android:id="@+id/homeFragment"
android:name="org.mozilla.fenix.home.HomeFragment"
android:label="fragment_home"
tools:layout="@layout/fragment_home">
<action
android:id="@+id/action_homeFragment_to_searchFragment"
app:destination="@id/searchFragment" />
<action
android:id="@+id/action_homeFragment_to_browserFragment"
app:destination="@id/browserFragment" />
<action
android:id="@+id/action_homeFragment_to_libraryFragment"
app:destination="@id/libraryFragment" />
<action
android:id="@+id/action_homeFragment_to_settingsFragment"
app:destination="@id/settingsFragment" />
</fragment>
<fragment
android:id="@+id/searchFragment"
android:name="org.mozilla.fenix.search.SearchFragment"
android:label="fragment_search"
tools:layout="@layout/fragment_search">
<action
android:id="@+id/action_searchFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@id/homeFragment" />
<argument android:name="session_id" app:argType="string" app:nullable="true"/>
</fragment>
<fragment
android:id="@+id/browserFragment"
android:name="org.mozilla.fenix.browser.BrowserFragment"
android:label="fragment_browser"
tools:layout="@layout/fragment_browser">
<action
android:id="@+id/action_browserFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@+id/homeFragment"
app:popUpToInclusive="true" />
<action
android:id="@+id/action_browserFragment_to_searchFragment"
app:destination="@id/searchFragment" />
<argument
android:name="session_id"
app:argType="string"
app:nullable="true" />
<action
android:id="@+id/action_browserFragment_to_settingsFragment"
app:destination="@id/settingsFragment" />
<action
android:id="@+id/action_browserFragment_to_libraryFragment"
app:destination="@id/libraryFragment" />
</fragment>
<fragment
android:id="@+id/libraryFragment"
android:name="org.mozilla.fenix.library.LibraryFragment"
android:label="@string/library_title"
tools:layout="@layout/fragment_library" />
<fragment
android:id="@+id/settingsFragment"
android:name="org.mozilla.fenix.settings.SettingsFragment"
android:label="@string/settings_title" />
</navigation>