![[android] 安卓自定义样式和主题,第1张 [android] 安卓自定义样式和主题,第1张](/aiimages/%5Bandroid%5D+%E5%AE%89%E5%8D%93%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A0%B7%E5%BC%8F%E5%92%8C%E4%B8%BB%E9%A2%98.png)
简单练习自定义样式和主题,样式是加在VIEw上,主题是加在Application或者Activity上
styles.xml
<?xml version="1.0" enCoding="utf-8"?><resources xmlns:androID="http://schemas.androID.com/apk/res/androID"> <!-- 自定义样式 --> style name="MyFont"> item ="androID:textcolor">#ff0000</item="androID:textSize">40spstyle="MyFontSon" parent="@style/MyFont">30sp 自定义主题 ="Mytheme"='androID:windowNoTitle'>true="androID:background">#ffffff>resources>
activity_main.xml
linearLayout ="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="match_parent" androID:layout_height androID:orIEntation="vertical" > TextVIEw ="@style/MyFont" androID:layout_wIDth androID:layout_height="wrap_content" androID:text="样式和主题" /> ="@style/MyFontSon"/>linearLayout>
Manifest.xml
application androID:allowBackup="true" androID:icon="@drawable/ic_launcher" androID:label="ss" androID:theme="@style/Mytheme" >总结
以上是内存溢出为你收集整理的[android] 安卓自定义样式和主题全部内容,希望文章能够帮你解决[android] 安卓自定义样式和主题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)