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