android 字体颜色选择器(ColorPicker)介绍
程序员文章站
2023-12-05 17:24:46
primary_text_yellow.xml 复制代码 代码如下:
primary_text_yellow.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- copyright (c) 2008 the android open source project
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/yellow"/>
<item android:state_window_focused="false" android:color="@android:color/black"/>
<item android:state_pressed="true" android:color="@color/yellow"/>
<item android:state_selected="true" android:color="@color/yellow"/>
<item android:color="@android:color/black"/>
<!-- not selected -->
</selector>
themes.xml
<item name="android:textcolor">@color/primary_text_yellow</item>
复制代码 代码如下:
<?xml version="1.0" encoding="utf-8"?>
<!-- copyright (c) 2008 the android open source project
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/yellow"/>
<item android:state_window_focused="false" android:color="@android:color/black"/>
<item android:state_pressed="true" android:color="@color/yellow"/>
<item android:state_selected="true" android:color="@color/yellow"/>
<item android:color="@android:color/black"/>
<!-- not selected -->
</selector>
themes.xml
复制代码 代码如下:
<item name="android:textcolor">@color/primary_text_yellow</item>
上一篇: Mysql命令行导入sql数据
推荐阅读
-
android 字体颜色选择器(ColorPicker)介绍
-
Android 实现不同字体颜色的TextView实现代码
-
listview改变选中行的字体颜色实例介绍
-
Android修改DatePicker字体颜色及分割线颜色详细介绍
-
Android Studio怎么自定义颜色?Android Studio更换字体大小颜色的方法
-
android studio怎么设置android Logcat字体颜色?
-
DW在哪里修改字体颜色?DW修改字体颜色方法介绍
-
android 设置控件的颜色字体的方法
-
Android 修改状态栏字体的颜色
-
Android修改DatePicker字体颜色及分割线颜色详细介绍