分享 Android Activity’s launchMode

Stack

如何設定 launchMode

AndroidManifest.xml 設定 launchMode

查看 Back Stack 工具

adb shell dumpsys activity activities | sed -En -e ‘/Running activities/,/Run #0/p’

四種啟動模式

standard (the default mode)

全部設為 standard

singleTop

B 設定為 singleTop

singleTask

B 設定為 singleTask

singleInstance

B 設定為 singleInstance

結語

--

--

--

Shares Android development and Kotlin programming.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hank Li

Hank Li

Shares Android development and Kotlin programming.

More from Medium

Video and Audio in Android

BookLogApplication: Connecting the dots with more logic

Creating Home Channel on Android TV

Dialog in Android Jetpack Compose with MVVM