我在我的应用中使用actionbarsherlock。我想在操作栏下面添加一个视图。请参阅以下屏幕截图:
我想将4色条带添加到操作栏。怎么做?
答案 0 :(得分:1)
您可以为CustomView
创建ActionBar
。
然后你就是这样做的:
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setCustomView(R.layout.my_custom_view);
在here
中查看详情编辑:实际上,你可以使用:
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.background_action_bar));
你的抽签是这样的: