当前位置: 移动技术网 > 移动技术>移动开发>Android > android 字体颜色选择器(ColorPicker)介绍

android 字体颜色选择器(ColorPicker)介绍

2019年07月24日  | 移动技术网移动技术  | 我要评论
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>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网