以我现在的理解能力,Android中style就是一控件属性集中设置的一个集合
例如:
<style name="textstyle" >
<item name="android:textSize">30sp</item>
<item name="android:textColor">#0f0</item>
<item name="android:text">CSDN</item>
<item name="android:background">#ff0000</item>
</style>
这是设置方法:
<pre name="code" class="java"> <TextView
style="@style/textstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
设置之后的效果:
<img src="https://img-blog.csdn.net/20160803212559428?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />