I would hide navigation bar and action bar of my app after some second that display don't get touched, and expand current view to fullscreen. Then if user touch the screen (or better if he swipe down), make visible both again. How to?
It's a nice mixture of Android 9 Pie and Android 10 gestures. Go through the steps below to make changes. Step 1: Open the Settings app on your Samsung device. Step 2: Navigate to the Display > Navigation Bar > Full screen gestures > More options > Swipe from bottom.
Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.
You can directly hide Action Bar for a specific activity by specifying the NoActionBar theme in its activity tag in the manifest file.
You can use a Handler
to delay certain actions.
Handler h = new Handler();
h.postDelayed(new Runnable() {
@Override
public void run() {
// DO DELAYED STUFF
getActionBar().hide();
}
}, delaytime); // e.g. 3000 milliseconds
The actions you take inside the
run()
method will be executed after the delay-time you set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With