[android] 安卓自定义样式和主题详解手机开发
2023-06-13 09:20:13 时间
简单练习自定义样式和主题,样式是加在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 name="android:textColor" #ff0000 /item item name="android:textSize" 40sp /item /style style name="MyFontSon" parent="@style/MyFont" item name="android:textSize" 30sp /item /style !-- 自定义主题 -- style name="MyTheme" item name=android:windowNoTitle true /item item name="android:background" #ffffff /item /style /resources
activity_main.xml
?xml version="1.0" encoding="utf-8"? LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="样式和主题" TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="样式和主题" /LinearLayout
Manifest.xml
application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="ss" android:theme="@style/MyTheme"
5376.html
app程序应用开发手机开发无线开发移动端开发相关文章
- Android telephony_android获取真实时间
- 安卓四大组件面试题_android常见面试题
- 使用青花瓷对Android app 抓包
- android中的加密算法,Android中加密算法[通俗易懂]
- android更换开机动画,修改安卓开机动画(除了部分系统 如MIUI等)
- delphixe5 android,Delphi XE5 Android手机端转换Ansi字符串
- Android模拟器开发_安卓模拟器开发
- Android监听来电状态
- 【Android 逆向】Android 权限 ( Android 逆向中使用的 android.permission 权限 | Android 系统中的 Linux 用户权限 )
- 【Android 逆向】类加载器 ClassLoader ( 使用 DexClassLoader 动态加载字节码文件 | 准备 DEX 字节码文件 )
- Android中的ProgressBar的android:indeterminate详解手机开发
- Canonical 准备与 Android 厂商合作推出更多 Ubuntu Phone
- 安卓编年史(8):Android 1.5 Cupcake——虚拟键盘打开设备设计的大门
- Android发现新病毒,每天1.3万部安卓手机和100万个账号被控制
- Android控件系列之XML静态资源使用介绍
- Android实现永久保存数据的方法详解
- android计算器代码示例分享
- 六款值得推荐的android(安卓)开源框架简介