button (buttons)
EditText (edit box)
android:password= ""//whether to display in ciphertext mode
android:numeric= "integer"//can only enter a number
android:hint= "* *"//watermark
Android:enabled= "false"//setting is available, false not used
RadioButton (radio button)
Embed in Radiogroup to achieve a single-selection effect
android:checkedbutton= "Radio ID value";
int Getcheckedradiobuttonid (); Gets the ID of the selected radio button
CheckBox (check box)
Android:checked= "true"; Set Default check
CheckBox (Context context)//Instantiation checkbox Component
void Setchecked (Boolean checked)//set Default check
ImageView (Picture control)
Android:maxheight= ""; Maximum height of the picture
Android:maxwidth= ""; Maximum width of the picture
Android:src= ""; Resource ID of the picture
Android:adjustviewbounds= ""; Set to True, then MaxHeight and MaxWidth
ImageButton (Picture button)
Timepicker (Time picker)
|
Method |
Describe |
|
Integer Getcurrenthour () |
Returns the hour of the current setting |
|
Integer Getcurrentminute () |
Returns the current set of minutes |
|
Boolean Is24hourview () |
Determine if it is a 24-hour system |
|
void Setcurrenthour (Integer currenthour) |
Set the current number of hours |
|
void Setcurrentminute (Integer currentminute) |
Set the current minute |
|
void SetEnabled (Boolean enabled) |
Whether the settings are available |
|
void Set24hourview (Boolean id24hourview) |
Setup time is 24-hour system |
DatePicker (date selector)
|
Method |
Describe |
|
Int GetYear () |
Gets the set year |
|
Int GetMonth () |
Gets the set month |
|
int GetDayOfMonth () |
Date of the set-up |
|
void SetEnabled (Boolean enabled) |
Whether the settings are available |
Android Chapter two controls 2