简体   繁体   English

在Android Honeycomb中实施操作栏

[英]Implement Actionbar in Android Honeycomb

How to implement the ActionBar in android honeycomb? 如何在Android Honeycomb中实现ActionBar? How to customize the action bar? 如何自定义操作栏? Any help would be appreciated. 任何帮助,将不胜感激。

try this 尝试这个

ActionBar actionBar = getActionBar();
    LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout."id", null);
    // lay.setLayoutParams(new ActionBar.LayoutParams(
    // android.app.ActionBar.LayoutParams.MATCH_PARENT,
    // android.app.ActionBar.LayoutParams.MATCH_PARENT));
    //Not wrking
    actionBar.setCustomView(view);
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);

You can also use the following resource to know more about implementing the action bar- 您也可以使用以下资源来了解有关实施操作栏的更多信息-

http://developer.android.com/guide/topics/ui/actionbar.html http://developer.android.com/guide/topics/ui/actionbar.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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