Qianfeng-android-day03-radiobutton and Radiogroup's usage, CheckBox, ProgressBar Basic Learning:

Source: Internet
Author: User

First, the use of RadioButton and Radiogroup "Focus"
Common properties of RadioButton and Radiogroup
Get the ID of the selected radiobutton
int checkedradiobuttonid = Gender.getcheckedradiobuttonid ();
Binding Radiogroup-specific listeners
Change of listening order options
Gender.setoncheckedchangelistener (New Oncheckedchangelistener () {
Group represents the current Radiogroup
Checkedid indicates the ID of the selected radiobutton
@Override
public void OnCheckedChanged (radiogroup group, int checkedid) {
RadioButton checkedbtn = (RadioButton) Findviewbyid (Checkedid);
The first parameter represents a context
The second parameter represents the text to display
The third parameter indicates the time displayed
Toast.maketext (Mainactivity.this, Checkedbtn.gettext (). toString (), Toast.length_short). Show ();
}
});
Second, the checkbox of the multi-selection effect and monitoring
Common Properties of a checkbox
Binding checkbox-Specific listener
Setonclicklistener ();
Third, ProgressBar
Basic usage of ProgressBar
Common Properties of A.progressbar
Android:max= "" Set the maximum length of the progress bar
Android:progress= "" Sets the current progress of the progress bar
android:secondaryprogress= "" Setting secondaryprogress Current progress
style= "" Setting the style of the progress bar
ProgressBar of the title bar (Learn about it)
Common methods of B.progressbar
Getprogress ();/setprogress ();
Setmax ();
Getsecondaryprogress ();/setsecondaryprogress ();
C.progressbar Landscaping
android:progressdrawable= "@drawable/my_progressbar_style" to set the color of the horizontal progress bar
Android:indeterminatedrawable setting a picture of a circular progress bar

http://blog.csdn.net/u012702547/article/details/50669932
Iv. SeekBar
Basic usage of Seekbar
A. Inheritance relationships and usage scenarios
B. Common Properties
Android:max= ""
Android:progress= ""
Android:secondaryprogress= ""
C. Common methods
Setmax ();
Setonseekbarchangelistener ();
Setprogress ();
The beautification of D.seekbar
Style= "@android: Style/widget.seekbar"
android:maxheight= "2DP"
android:minheight= "2DP"
android:progressdrawable= "@drawable/myseekbarprogressdrawable"
android:thumb= "@drawable/myselctor"

Qianfeng-android-day03-radiobutton and Radiogroup's usage, CheckBox, ProgressBar Basic Learning:

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.