简体   繁体   中英

Change Android ActionBar overflow icon in code

Is it possible to change overflow icon in code?

I read this solution: Changing overflow icon in the action bar

But I need to make it in code, to select white or grey style during runtime.

Is it possible?

You can only change this in a theme.

One potential solution would be to call setTheme as the very first thing in onCreate with different themes depending on whether you needed white or gray.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM