首页 > 移动平台 > 详细

3.App Resources-Resource Types/Style Resource

时间:2014-11-03 16:06:30      阅读:228      评论:0      收藏:0      [点我收藏+]

1. Style Resource

  A style resource defines the format and look for a UI. A style can be applied to an individual View (from within a layout file) or to an entire

    Activity or application (from within the manifest file).

//res/values
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="CustomText" parent="@style/Text">
        <item name="android:textSize">20sp</item>
        <item name="android:textColor">#008</item>
    </style>
</resources>

  xml file that applied the style to a TextView

<?xml version="1.0" encoding="utf-8"?>
<EditText
    style="@style/CustomText"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Hello, World!" />

 

3.App Resources-Resource Types/Style Resource

原文:http://www.cnblogs.com/iMirror/p/4071362.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!