Android – sethomeasuppindicator does not take effect when setdisplayshowhomeenabled (false) is used

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
分享
二维码
< <上一篇
下一篇>>