Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

does not have a NavController set on 2131231008

// activity_main.xml
<fragment
       android:layout_width="match_parent"
       android:layout_height="match_parent"
        android:name="androidx.navigation.fragment.NavHostFragment"
       android:id="@+id/nav_host_fragment"
       app:navGraph="@navigation/mobile_navigation" />
         
// MainActivity.kt
val toolbar = findViewById<MaterialToolbar>(R.id.main_toolbar)
setSupportActionBar(toolbar)
Source by qa.ostack.cn #
 
PREVIOUS NEXT
Tagged: #NavController #set
ADD COMMENT
Topic
Name
5+4 =