I have a NavigationView in my app. I want to open the NavigationView when resent apps navigation button is clicked. I tried this:
@Override
protected void onPause () {
if(!(drawer.isDrawerOpen(GravityCompat.START))){
drawer.openDrawer(GravityCompat.START);
}
super.onPause();
}
But it opened recent apps and NavigationView together. Is there any way to open NavigationView when recent app button is clicked?
I tried this
onPause()
is not unique to your desired scenario. There are many things that trigger onPause()
, including system HOME navigation and configuration changes (eg, screen rotation).
Is there any way to open NavigationView when recent app button is clicked?
No:
There may not be such a button, such as on the millions of devices that use gesture navigation
Apps are not informed about when that button gets clicked
Apps cannot interfere with the operation of that button
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.