简体   繁体   中英

Android - can I change exit buttons on Screen Pinning?

In 5.0 Android add Screen Pinning: https://developer.android.com/about/versions/android-5.0.html

I call in my app calling startLockTask() but for exit the app user always need to " holding both the Back and Recent buttons"

Can I change these and choose my own buttons combination?

The API says there is a complementary stopLockTask() function so you can assign a custom button to call that. However, I don't think you can change the navigation buttons combination.

https://developer.android.com/reference/android/app/Activity.html#stopLockTask()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM