Android User Interface design

Source: Internet
Author: User

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

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.