Common classes under the 1.android.provider package
The package provides access to contact information, calendar information, and multimedia file classes.
A common class.
MediaStore.Audio.Media class
public static final Uri External_content_uri;
The content://style URI for the "primary" external storage volume.
String default_sort_order;//the DEFAULT SORT ORDER for this table
2. Create a menu
Optionmenu: After the user taps the "menu" key, the menu appears at the bottom of the interface
ContextMenu: When the user presses the item on the list, a menu is displayed
Covering these two methods in activity.
@Override Public BooleanOncreateoptionsmenu (Menu menu) {//call the Add method for adding menu options//menu.add (0,opton_item_exit, 0, r.string.option_exit);//menu.add (0,opton_item_scan, 1, R.string.option_scan); //The second method uses the Menuinflater method layout optionMenuinflater menuinflater=Getmenuinflater (); Menuinflater.inflate (R.menu.option_menu, menu); return true; } @Override Public voidOncreatecontextmenu (ContextMenu menu, View V, contextmenuinfo menuinfo) {//register ContextMenu for the ListView//layout ContextMenu, or you can use Menuinflater to specify the XML layoutMenu.add (0, Context_option_delete, 0, R.string.context_option_delete); Menu.add (1,context_option_property,0, R.string.context_option_property); Registerforcontextmenu (Getlistview ()); }
3.Dialog
Android offers 4 types of Dialog:alertdialog,progressdialog,datepickerdialog,timepickerdialog
Android User Interface design