First, TextView inherits from the view class, is essentially a text editor, just android off its editing function. The function of editing text is given to its subclass--edittext.
The Special place:
1. By setting the Ellipsize=marquee, you can achieve "marquee"
Android:width= "Wrap_content"
Android:focusable = "true"
Android:singleline = "true"
Android:ellipsize= "Marquee"
Android:focusableintouchmode= "true"
2. You can set the text with the link through Autolink. Type of support:
e-mail \ phone \ URL (email\phone\web)
Second, EditText is the TextView subclass. The biggest difference: You can accept user input.
Important attributes:
InputType type of data entered
Hint the prompt in the input box
Selectallonfocus whether to select all when getting focus
Special CONTROLS:
Autocompletetextview with auto-complete function edittext
Google engineers give it a name when the heart ~ ~ ^_^ #
Third, Button is the subclass of TextView, when the user clicks the onclick () trigger
Special Features: Use selector to modify backgrounds in different states.
Under the drawable directory, create a selector file.
<item android:state_pressed="false" android:drawable="***"></item>
Iv. RadioButton and Checkboxes
Same point: It's more than a button. A feature that can be selected
One more checked attribute
Different points: RadioButton for more than one, was radiogroup wrapped
Checkboxes can be selected multiple
Five, State switch ToggleButton
Special properties:
android:checked Sets whether the button is selected
Android:texton setting the text in the open state
Android:textoff setting the text in the off state
Six, timer chronometer
Android:format setting the timing format of the timer
Method:
SetBase (long base) sets the start time of the timer
SetFormat (String format) sets the format for displaying time
Start () Begin timing
Stop () stops timing
Setonchronometerticklistener event Listener, which is triggered when time changes
^_^ # Tease me yesterday with the TimerTask realized the chronograph function, the error is very big ... After a period of time to study the source code, see how chronometer is realized ~ ~
Copyright notice: Just out of the original content of the pot, I hope you have help ~
Android Basic UI Chapter------TextView and its subclasses