Navigation Architecture Component - Activities

前端 未结 3 1505
遥遥无期
遥遥无期 2021-01-31 08:08

I\'ve been following the docs from Navigation Architecture Component to understand how this new navigation system works.

To go/back from one screen to another you need

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 08:20

    I managed to navigate from one activity to another without hosting a Fragment by using ActivityNavigator.

    ActivityNavigator(this)
                        .createDestination()
                        .setIntent(Intent(this, SecondActivity::class.java))
                        .navigate(null, null)
    

提交回复
热议问题