[android] 安卓自定义样式和主题

[android] 安卓自定义样式和主题,第1张

概述简单练习自定义样式主题样式是加在View上,主题是加在Application或者Activity上 styles.xml activity_main.xml Manifest.xml

简单练习自定义样式和主题,样式是加在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] 安卓自定义样式和主题所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1121201.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存