(7) Android control-widgets

Source: Internet
Author: User

1.TextView

Similar to lable in C #, displaying a text

<TextView        android:id= "@+id/textview2"        android:layout_width= "Wrap_content"         android:layout_height= "Wrap_content"        android:layout_weight= "1"        Android:text = "TextView"/>

2.Button

    <button        android:text= "PDA"        android:layout_width= "Wrap_content"        android: Layout_height= "Wrap_content"        android:id= "@+id/buttonpda"        android:layout_weight = "1"        />

3.ToggleButton

Click button OFF on toggle

    <ToggleButton        android:id= "@+id/togglebutton"        android:layout_width= "Wrap_ Content "        android:layout_height=" Wrap_content "        android:layout_weight=" 1 "         android:text= "ToggleButton"/>

4.CheckBox

check box

    <CheckBox        android:id= "@+id/checkbox2"        android:layout_width= "Wrap_content"         android:layout_height= "Wrap_content"        android:layout_weight= "1"        Android:text = "checkbox"/>

5.RadioButton

Radio Box

    <RadioButton        android:id= "@+id/radiobutton2"        android:layout_width= "Wrap_content"         android:layout_height= "Wrap_content"        android:layout_weight= "1"        android: Text= "RadioButton"/>

6.CheckedTextView

<Checkedtextview Android:id= "@+id/checkedtextview3"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_weight= "1"Android:text= "Multi-choice style"Android:checkmark= "Android:attr/listchoiceindicatormultiple"/> <Checkedtextview Android:id= "@+id/checkedtextview4"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_weight= "1"Android:text= "single-choice style"Android:checkmark= "? Android:attr/listchoiceindicatorsingle"/>

7.Spinner

drop-down box

    <Spinner        android:id= "@+id/spinner"        android:layout_width= "Match_parent"         Android:layout_height= "Wrap_content"        android:layout_weight= "1"/>

8.ProgressBar

Arc Progress bar 1

   <ProgressBar        android:id= "@+id/progressbar"        style= "? android:attr/ Progressbarstyle "        android:layout_width=" Wrap_content "        android:layout_height=" Wrap_content "        android:layout_weight=" 1 "/>

Line Progress bar 2

   <ProgressBar        android:id= "@+id/progressbar3"        style= "? android:attr/ Progressbarstylehorizontal "        android:layout_width=" Wrap_content "        android:layout_height = "Wrap_content"        android:layout_weight= "1"/>

9.SeekBar

Sliding Adjustment 1

<SeekBar    android:id= "@+id/seekbar"    android:layout_width= "Wrap_content"     android:layout_height= "Wrap_content"    android:layout_weight= "1"/>


Sliding Adjustment 2

<SeekBar    android:id= "@+id/seekbar2"    style= "@style/ Widget.AppCompat.SeekBar.Discrete "    android:layout_width=" Wrap_content "    android:layout_ Height= "wrap_content"    android:layout_weight= "1"    android:max= "Ten"     Android:progress= "3"/>

10.QuickContactBadge

Contact

11.RatingBar

Grade

    <ratingbar        android:id= "@+id/ratingbar"        android:layout_width= "Wrap_content"         android:layout_height= "Wrap_content"        android:layout_weight= "1"/>

12.Switch

Slide switch

    <Switch        android:id= "@+id/switch1"        android:layout_width= "Wrap_content"         android:layout_height= "Wrap_content"        android:layout_weight= "1"        android: Text= "Switch"/>

13.Space

(7) Android control-widgets

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.