Android basic interface controls)

Source: Internet
Author: User
ArticleDirectory
    • 1. Text class:
    • 2. Button class:
    • 3. Image class:
    • 4. Time Control:
    • 5. Progress display:
    • 6. Navigation:
    • 7. Video Media:
    • 8. Dialog dialog box
    • 1. layout class:
    • 2. layout class for the adapter:
    • 3. scroll bar:

Most of the interface controls are on Android. view and Android. in the widget package, android. view. view is their parent class, as well as the dialog series, android. app. dialog is the parent class, and so on.

Android native controls are generally declared in XML files under Res/layout. Then, layout is loaded in activity by using super. setcontentview (R. layout. layout file name. Super is required to obtain control references in activity. findviewbyid (R. id. control ID), then you can use this reference to operate on the control, such as adding listeners and setting content. You can also useCodeDynamic use of controls.

View subclass structure:

Textview subclass structure:

Viewgroup subclass structure:

 

Framelayout subclass structure:

 

Android. App. Dialog subclass structure:

Part 1: Basic controls 1. Text class:

Http://limingnihao.iteye.com/blog/851386

Textview, edittext, autocompletetextview, multautocomplettextview, (textswitcher), (digitalclock)

 

Extractedittext, checkedtextview, chronometer

 

2. Button class:

Http://limingnihao.iteye.com/blog/851396

Button, checkbox, radiobutton (radiogroup), togglebutton, (imagebutton)

 

Compoundbutton

 

Zoom button:

Zoombutton, zoomcontrols

 

3. Image class:

Http://limingnihao.iteye.com/blog/851408

Imageview, zoombutton, imagebutton, (imageswitcher)

 

Quickcontactbadge

 

4. Time Control:

Http://limingnihao.iteye.com/blog/852493

Digitalclock, analogclock, timepicker, datepicker

 

5. Progress display:

Http://limingnihao.iteye.com/blog/852498

Progressbar, absseekbar, seekbar, ratingbar

 

6. Navigation:

Tabhost and tabwidget.

 

7. Video Media:

Videview and mediacontroller

 

8. Dialog dialog box

Characherpickerdialog, alertdialog, datepickerdialog, progressdialog, timepickerdialog

 

Part 2: Layout Class 1. layout class:

Absolutelayout, linearlayout, radiogroup, tablelayout, tablerow, relativelayout, and framelayout

 

2. layout class for the adapter:

Adapterview, abslistview, gridview, listview, absspinner, gallery Spinner

 

3. scroll bar:

Horizontalscrollview and scrollview

 

Part 3: Others

Webpage:

Webview

 

Animation:

Viewaimator, viewfilpper, viewswitcher, imageswitcher, textswitcher

 

Others:

Keyboardview

Surfaceview (used for photography) glsurfaceview

Viewstub dialerfilter twolinelistitem slidingdrawer gestureoverlayview

 

Where:

Listview is generally used with listactivity. Tabactivity: http://limingnihao.iteye.com/

Tabhost and tabwidget are generally used with tabactivity. Listactivity: The http://limingnihao.iteye.com/

Related Article

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.