Android入门--style.xml设置和应用
来源:互联网 发布:linux 重启jenkins 编辑:程序博客网 时间:2024/06/06 02:49
在res/values中添加style.xml文件,如下:
<resources> <style name="myStyle_Text1"><item name="android:textSize">25sp</item><item name="android:textColor">#80FF00</item></style><style name="myStyle_Text2"><item name="android:textSize">18sp</item><item name="android:textColor">#0C688E</item><item name="android:fromAlpha">0.0</item><item name="android:toAlpha" >0.0</item></style></resources>activity_forwarding.xml文件代码如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.example.forwarding.Forwarding" > <Button android:id="@+id/button1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:text="@string/Btn01" /> <TextView android:id="@+id/textView1" style="@style/myStyle_Text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/button1" android:layout_marginTop="20dp" android:text="@string/Texts" android:textAppearance="?android:attr/textAppearanceLarge" /> <TextView android:id="@+id/textView2" style="@style/myStyle_Text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textView1" android:layout_marginTop="20dp" android:text="@string/Texts" android:textAppearance="?android:attr/textAppearanceLarge" /> </RelativeLayout>
0 0
- Android入门--style.xml设置和应用
- android style(样式)和theme(主题)设置
- android style(样式)和theme(主题)设置
- android style(样式)和theme(主题)设置
- Android style(样式)和theme(主题)设置
- Android Style样式的定义和应用
- Android中Theme和Style的应用
- Android开发应用之Theme和Style
- Android Style XML
- Android Style.xml 详解
- Android xml中 @和?区别,style和attr小结
- android Style应用
- android Style应用
- Android 下style应用
- Android的Theme的设置和Style的使用
- ReactNative中iOS和Android的style分开设置教程
- Android应用开发中的风格和主题(style,themes)
- Android应用开发中的风格和主题(style,themes)
- DIV与CSS的结合使用
- c primer plus第3章总结:数据类型
- leetcode 355 Design Twitte
- linux给用户添加sudo权限
- (笔记)音频播放
- Android入门--style.xml设置和应用
- Activity生命周期、启动方式及常见Activity
- Two Sum
- 深度学习与自然语言处理(2)_斯坦福cs224d Lecture 2
- 近期学习css+javascript
- Caffe 实例笔记 3 Brewing Logistic Regression then Going Deeper
- Labview实现简单知乎日报客户端
- 《2016互联网趋势报告》解读(一)
- (转载)NSUserDefaults 保存数据