Created
September 3, 2018 16:47
-
-
Save prasannajeet/a8605060aae5b8ca51b5145bce96cf9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.praszapps.mysamplenavapp | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import androidx.navigation.fragment.NavHostFragment | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val host = NavHostFragment.create(R.navigation.welcome_nav_graph) | |
supportFragmentManager.beginTransaction().replace(R.id.fragment_container, host).setPrimaryNavigationFragment(host).commit() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment