In addition to fragments (fragments), new additions in ANDROID3 and 4, and actionbar (activity bar). Actionbar is located in the traditional title bar at the top of the device screen. Actionbar shows the application icon and the title of the activity. Optionally, the right side of the Actionbar is those action items (active items). The following illustration shows the build-in (built-in) email application, showing the application icon, the activity's title, and some activity items. The next section discusses the action items (active items) in more detail.
The following example will show you how to hide and display Actionbar by writing code.
1. Create a project, Myactionbar.
2. Press F11 to debug on the simulator. At this point, you will see that Actionbar is placed at the top of the screen (including the applied icon and the name "Myactionbar"). The following figure.
3. To hide Actionbar, you can add the following code to the Androidmanifest.xml.
<?xml version= "1.0" encoding= "Utf-8"?> <manifest xmlns:android= "Http://schemas.android.com/apk/res/androi"
D "package=" Net.learn2develop.MyActionBar "android:versioncode=" 1 "android:versionname=" 1.0 "> <uses-sdk android:minsdkversion= "/> <application android:icon=" @drawabl E/ic_launcher "android:label=" @string/app_name "> <activity android:label=" @strin G/app_name "Android:name=". Myactionbaractivity "<!--note that this line of code--> android:theme=" @android: Style/theme.holo.noactionbar " > <intent-filter > <action android:name= "Android.intent.action.MAIN"/&G
T <category android:name= "Android.intent.category.LAUNCHER"/> </intent-filter> &l T;/activity> </application> </manifeSt>