The "Android registration page" blog in the Main.xml code in each component defines the attributes have a duplicate of the section, in order to avoid the tedious can be the various components duplicate properties defined into a file: res/values/
Style_test.xml Source:
<?xml version= "1.0" encoding= "Utf-8"?>
<resources>
<style name= "Codefont" parent= "@android: Style/textappearance.medium" >
<item name= "Android:layout_width" >match_parent</item>
<item name= "Android:layout_height" >wrap_content</item>
<item name= "Android:textsize" >16sp</item>
</style>
</resources>
The Main.xml file is modified as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<tablelayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
android:stretchcolumns= "1"
android:background= "@drawable/bluesky"
>
<!--account--
<TableRow>
<textview
style= "@style/codefont"
android:text= "Account Number:"
/>
<edittext
style= "@style/codefont"
android:hint= "Phone Number"
Android:selectallonfocus= "true"
/>
</TableRow>
<!--password--
<TableRow>
<textview
style= "@style/codefont"
android:text= "Password:"
/>
<edittext
style= "@style/codefont"
Android:inputtype= "Numberpassword"
/>
</TableRow>
<!--Birthday--
<TableRow>
<textview
style= "@style/codefont"
android:text= "Birthday:"
/>
<edittext
style= "@style/codefont"
Android:inputtype= "Date"
/>
</TableRow>
<!--address--
<TableRow>
<textview
style= "@style/codefont"
android:text= "Address:"
/>
<edittext
style= "@style/codefont"
Android:inputtype= "Textpostaladdress"
/>
</TableRow>
<!--e-mail--
<TableRow>
<textview
style= "@style/codefont"
android:text= "e-mail:"
/>
<edittext
style= "@style/codefont"
Android:inputtype= "Textemailaddress"
/>
</TableRow>
<!--Registration--
<TableRow>
<button
style= "@style/codefont"
android:text= "Register"
/>
</TableRow>
</TableLayout>
The running result is still.
Android style and theme (i)