Android – sethomeasuppindicator does not take effect when setdisplayshowhomeenabled (false) is used
•
Android
I want to change the actionbar indicator (left arrow) and don't want to display the logo, so I setdisplayshowhomeenabled (false) to make the logo invisible, and sethomeasuppindicator (my picture) to change the indicator, but it doesn't work
resolvent:
One method is not to call setdisplayshowhomeenabled (false). Instead, use findviewbyid () to get the home view and directly set it to go
View homeView = findViewById(android.R.id.home);
homeView.setVisibility(View.GONE);
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码