Tim*_*len 14 android android-actionbar
我正在尝试在操作栏的右上角显示数据计数.
如果我不使用拆分操作栏,我只会在栏中创建一个TextView,但是当你拆分时,目前无法在顶部操作栏中放置项目.
澄清一下,我的意思是:
Google是否使用了不同的Action Bar实现,还是有办法实现这一目标?我想我记得读过它,但我找不到它的名字.
rof*_*son 25
使用自定义视图和顶部AB的微调器和文本视图,并android:uiOptions="splitActionBarWhenNarrow"在活动的清单声明中启用
//set the actionbar to use the custom view (can also be done with a style)
getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
//set the custom view to use
getActionBar().setCustomView(R.layout.custom_ab);
Run Code Online (Sandbox Code Playgroud)
custom_ab.xml使用ImageView,Spinner和TextView进行计数的布局在哪里.
| 归档时间: |
|
| 查看次数: |
8233 次 |
| 最近记录: |