2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Navigation Editorを使ってみる

Last updated at Posted at 2019-01-24

Android Studio 3.3でNavigation Editorなるものがサポートされたらしいので使ってみることにします.

下準備

build.gradleに以下を追加.
Javaなら

dependencies {
    def nav_version = "1.0.0-alpha11"

    implementation "android.arch.navigation:navigation-fragment:$nav_version"
    implementation "android.arch.navigation:navigation-ui:$nav_version"
}

kotlin使ってるなら

dependencies {
    def nav_version = "1.0.0-alpha11"

    implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
    implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
}

res右クリックのNew > Android Resource Fileを選択.
ファイル名はnav_graph
Resource typeNavigationを選択しOKを押す.

これで使えるようになります.
まあ,Android Developersのドキュメントそのままなんですけどね・・・

使ってみてまた追記します.

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?