《android注册页面》博客中main.style_test.
<?<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>
main.
<?<TableLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1"
android:background="@drawable/bluesky"
>
<!-- 账号 -->
<TableRow>
<TextView
android:text="账号:"
/>
<EditText
android:hint="手机号"
android:selectAllOnFocus="true"
/>
</TableRow>
<!-- 密码 -->
<TableRow>
<TextView
android:text="密码:"
/>
<EditText
android:inputType="numberPassword"
/>
</TableRow>
<!-- 生日 -->
<TableRow>
<TextView
android:text="生日:"
/>
<EditText
android:inputType="date"
/>
</TableRow>
<!-- 住址 -->
<TableRow>
<TextView
android:text="住址:"
/>
<EditText
android:inputType="textPostalAddress"
/>
</TableRow>
<!-- 电子邮箱 -->
<TableRow>
<TextView
android:text="电子邮箱:"
/>
<EditText
android:inputType="textEmailAddress"
/>
</TableRow>
<!-- 注册 -->
<TableRow>
<Button
android:text="注册"
/>
</TableRow>
</TableLayout>
运行结果依旧。
原标题:android样式和主题(一)
关键词:Android