Tag: ANDROID-NAVIGATION-GRAPH
Tengo 5 elementos de menú en la navegación inferior, supongamos (A,B,C,D,E). He definido el gráfico de navegación para cada uno de estos elementos de menú. Digamos que estoy en la pestaña B de la navegación inferior y realizo algunos clics y ahora navega hacia una acción definida en el gráfico . . . Read more
Mi ViewPager consiste en 2 fragmentos que se muestran correctamente y funcionan bien. Desde el fragmento del ViewPager quiero moverme a otro fragmento a través del gráfico de navegación. Este es mi gráfico: <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/offer_nav_graph” app:startdestination=”@id/offersFragment”> <fragment android:id=”@+id/offersFragment” android:name=”com.octave.offers.OffersFragment” android:label=”offers_fragment” tools:layout=”@layout/offers_fragment”></fragment> <fragment android:id=”@+id/availableOfferDetailFragment” android:name=”com.octave.offers.available.AvailableOfferDetailFragment” android:label=”fragment_available_offer_detail” tools:layout=”@layout/fragment_available_offer_detail”></fragment> <fragment . . . Read more
Pregunta Tengo una aplicación simple en la que intento abrir otro fragment al hacer clic en un botón. Mi grafo de navegación <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/app_navigation” app:startDestination=”@id/homeFragment”></p> <pre><code><fragment android:id=”@+id/homeFragment” android:name=”com.mine.parsexml.HomeFragment” android:label=”fragment_home” tools:layout=”@layout/fragment_home” > <action android:id=”@+id/action_homeFragment_to_playerFragment” app:destination=”@id/playerFragment” /> </fragment> <fragment android:id=”@+id/playerFragment” android:name=”com.mine.parsexml.PlayerFragment” android:label=”fragment_player” tools:layout=”@layout/fragment_player” /> </code></pre> <p></navigation> Este es mi . . . Read more