1

I want to disable navigationbar for my android app. When my application open home button and recent app button disable.

How can I disable button when app is running?

Like pattern lock app, in this app when open lock screen disable all button.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Hardik Vaghasiya
  • 298
  • 1
  • 3
  • 11

1 Answers1

1

You can set the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag in your activity's onResume method.

This should help: http://developer.android.com/training/system-ui/navigation.html

Edit:

So it looks like you want something like this: https://stackoverflow.com/a/32983295/6176618

This this isn't officially supported and the workaround provided here is an obvious hack but it should serve your purposes.

Community
  • 1
  • 1