Android 布局样式和主题
来源:互联网 发布:less.js下载 编辑:程序博客网 时间:2024/06/05 16:14
样式和主题
样式:可以指定控件的显示形式
样式的继承:
<style name="my_textview_style_small" parent="@style/my_textview_style">
也可以使用
<style name = "父类样式名.子类的样式名"></style>
这样就表示了样式的继承了
css 样式 ,通用的样式模板,继承
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="my_textview_style">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#0000ff</item>
<item name="android:textSize">25sp</item>
</style>
<style name="my_textview_style_small" parent="@style/my_textview_style">
<item name="android:textSize">15sp</item>
</style>
<style name="my_textview_style.my_textview_style_verylarge" >
<item name="android:textSize">45sp</item>
</style>
</resources>
主题:主题和样式在声明的时候没有任何的区别,样式和主题的区别: 在定义上没有任何区别, 区别是在使用上,样式的作用范围:作用在控件上(textView,ImageView,Button)主题的作用范围:作用在一个activity上,或者作用在整个应用程序上。仿照系统的透明主题:<style name="my_theme">
<item name="android:windowBackground">@color/trans</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>
0 0
- Android 布局样式和主题
- android 样式和主题
- android样式和主题
- android样式和主题
- Android样式和主题
- Android 样式和主题
- android 样式和主题
- android样式和主题
- android样式和主题
- android主题和样式
- android 主题和样式
- Android主题和样式
- android样式和主题
- Android:样式和主题
- Android 主题和样式
- Android样式和主题
- Android主题和样式
- [Android]主题和样式
- [LeetCode] Game of Life
- JQuery 跨域访问
- 51nod 1435 位数阶乘 找规律
- HDOJ 3371 Connect the Cities 【Prime】
- java中的时间判断
- Android 布局样式和主题
- 查找算法——找到序列中第二大的数(修正版)
- linux:shell 编程 条件判断 以及 判断条件
- JCenter下载太慢?教你修改Maven仓库地址为国内镜像
- Android事件拦截/分发/响应 机制
- linux下安装erlang
- UIView总结
- UITableViewCell的样式
- 【Android开发—智能家居系列】(三):手机连接WIFI模块