Action bar for Android 2.1

前端 未结 6 1941
忘了有多久
忘了有多久 2021-02-09 11:36

Is there action bar for Android Level 7 or something else that I can use as action bar? I need to build an app which is using action bar for Android 2.1

相关标签:
6条回答
  • 2021-02-09 12:14

    The equivalent of action bar in pre-Honeycomb versions of Android is the options menu, accessible under Menu button.

    0 讨论(0)
  • 2021-02-09 12:20
    TypedArray a = mActivity.getTheme().obtainStyledAttributes(R.style.AppTheme, new int[] {
        R.attr.actionbarCompatItemHomeStyle,
        R.attr.actionbarCompatItemStyle
    });
    int actionbarCompatItemHomeStyle = a.getResourceId(0, 0);
    int actionbarCompatItemStyle = a.getResourceId(1, 0);
    ImageButton actionButton = new ImageButton(mActivity, null,
        itemId == android.R.id.home ? actionbarCompatItemHomeStyle : actionbarCompatItemStyle
    );
    
    0 讨论(0)
  • 2021-02-09 12:27

    JohanNilsson has actually created a ActionBar library which is available on GitHub.

    Direct link.

    0 讨论(0)
  • 2021-02-09 12:28

    here you go. The officle android article is called: ActionBarCompat - Action Bar Compatibility. (just in case the link wont work for ever)

    0 讨论(0)
  • 2021-02-09 12:29

    Well, you should try this open source project http://actionbarsherlock.com , you will find it's full definition on this website In the newest version it will have support for features provided by ICS.

    0 讨论(0)
  • 2021-02-09 12:31

    In July 2013 Google added action bar compatibility back to 2.1 (7+) in New "v7 appcompat library" http://developer.android.com/tools/support-library/index.html

    0 讨论(0)
提交回复
热议问题