在代码中更改Android ActionBar溢出图标

时间:2013-05-20 12:14:52

标签: android icons android-actionbar actionbarsherlock

是否可以更改代码中的溢出图标?

我读了这个解决方案:Changing overflow icon in the action bar

但是我需要在代码中创建它,以便在运行时选择白色或灰色样式。

有可能吗?

1 个答案:

答案 0 :(得分:1)

您只能在主题中更改此内容。

一个可能的解决方案是将setTheme作为onCreate中的第一件事,根据您是需要白色还是灰色,使用不同的主题。