es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: ANDROID-NAVIGATION-GRAPH

Diagrama de navegación con ViewPager2 Android

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

Gráfico de navegación abre otro fragmento.

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