Action Bar
Action Bar
Development
Lecture :
UTILIZING THE ACTION BAR Managing
Besides displaying the application icon and the activity title on the left of
the Action Bar, you can also display additional items on the Action Bar.
These additional items are called action items.
Action items are shortcuts to some of the commonly performed
operations in your application.
For example, you might be building an RSS reader application, in which
case some of the action items might be “Refresh feed,” “Delete feed”
and “Add new feed.”
Method1:
Create new project
Create an actionbar.xml file ( for designing of action bar)
Add actionbar.xml to activity_main.xml
Now access widgets of action bar in java file and apply clickListener
on it.
Method 2
Create new project
Create Menu directory and also menu file in it and add items in
menu.xml file.
Read menu file in MainActivity.class
Output
CREATING THE USER INTERFACE
PROGRAMMATICALLY
CREATING THE USER INTERFACE
PROGRAMMATICALLY