User interface

 

Styles and Themes

value/style

<style name="CodeFont" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
</style>
<style name="CodeFont.Color">
<item name="android:textColor">#FF0000</item>
</style>

<style name ="CodeFont.Color.Size">
<item name="android:textSize">20sp</item>
<item name ="android:background">#000000</item>
</style>

 

mainactivity.xml

<TextView
style="@style/CodeFont.Color.Size"
android:text="@string/hello_world" />

 

posted on 2015-12-02 19:02  zerop  阅读(228)  评论(0编辑  收藏  举报

导航