我使用greendroid来实现api 11下的actionbar。
现在我在我的MainView中有一个奇怪的行为( startview工作正常)
public class MainView extends GDActivity {
private boolean ison = false;
private FinderThread finder;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//this.getActionBar().removeViewAt(0);
setActionBarContentView(R.layout.mainlayout);
getActionBar().setBackgroundColor(Color.parseColor("#bf27c3"));
setTitle("TEST");
setTitleColor(Color.WHITE);
addActionBarItem(getActionBar().newActionBarItem(NormalActionBarItem.class).setDrawable(R.drawable.person));看起来:

Actionbar文本为空,并且没有home按钮。请帮帮忙
发布于 2012-04-07 01:40:07
您可以尝试使用设置标题和标题的颜色
getActionBar().setTitle("Title")
颜色也一样。还可以尝试通过RGB值设置颜色。
我不能保证这会起作用,因为我没有在我的actionbar中使用greendroid。但我知道你不使用actionbarsherlock + greendroid,因为它们只与一个技巧兼容(一点黑客xD)
https://stackoverflow.com/questions/10046301
复制相似问题