Android Learning 10 ActionBar

Source: Internet
Author: User

1.API level is greater than or equal to 11 support, or use a compatible library, but there are many issues with the compatibility library.

2. An action bar belongs to an activity and has its life cycle 3. The Action Bar is divided into 3 categories: a. tab action Bar, b. List Action Bar, c. Standard action Bar 4. Gets the active Action Bar Getactionbar () 5. Set the navigation mode of the action bar ActionBar ab =   Getactionbar (); Ab.setnavigationmode (Actionbar.navigation_mode_tabs);6. Add tab and set title and listener  Tablistener tl = New Tablistener ( This, This);tab tab = Ab.newtab ();     Tab.settitle ("some"); Tab.settablistener (t1);
7.20. Code snippet 20.1 How to implement text box scrolling a.<scrollview><textview></textview></scrollview> B. In the layoutAndroid:scrollbars= "Vertical"        Android:scrollbarstyle= "Insideoverlay" in the CodeTextView TV = GetView ();Tv.setmovementmethod (Scrollingmovementmethod. getinstance ());20.2 Expansion Menu    getmenuinflater (). Inflate (R.menu. Main, menu); 20.3 Setting the list navigation mode      ActionBar bar = This.getactionbar ();
bar.settitle (tag);
Bar.setnavigationmode (actionbar.navigation_mode_list);
Bar.setlistnavigationcallbacks (
New Simplespinnerarrayadapter (This),
New Listlistener (This,this));

Android Learning 10 ActionBar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.