(Android Study Notes) Android View
Android View class:
1. All Android components are subclasses of View.
2. All components can be configured in either of the following ways. Second, configure it through XML.
TextView class:
1. For text components, the main purpose is to statically display some text, similar to the label function.
2. It is a direct subclass of the android. widget. TextView class.
3. How to insert a hyperlink:
1) In the TextView component configuration in the XML file, write: android: autoLink = "all. Note: The symbols must be in English.
2) write the following in the Activity:
String html + ="Contact me anytime"; CharSequence charSequence = Html. fromHtml (html); textView1.setText (charSequence); textView1.setMovementMethod (LinkMovementMethod. getInstance ());
The textview1 is a hyperlink.
Style Sheet files:
There may be many components in Android. It is very troublesome to configure them one by one. Therefore, we can use the style sheet file for one-to-one configuration. Saves effort in development and maintenance.
Generally, the style sheet file is saved in the values folder under the res folder of the project. The file is style. xml.
Definition method:
Its reference is referenced by the name defined in name.
Definition:
Resources xmlns: android = "http://schemas.android.com/apk/res/android">
Reference: