您的位置:首页 > 移动开发 > Android开发

Android中使用自定义样式和主题

2017-06-18 20:39 260 查看
在activity_main.xml的<TextView>控件中,通过 style="@style/TextSryle"引入定义好的样式,代码如下:

<RelativeLayout   xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="math_parent"
android:layout_height="match_parent"
tool:context=".MainActivity">
<TextView
style="@style/TextStyle"
android:layout_centerInParent="true"
android:text="自定义样式”/>
</RelativeLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android