android 字體顏色選擇器(ColorPicker)介紹
更新時(shí)間:2012年11月23日 10:28:47 作者:
本文將詳細(xì)介紹android 字體顏色選擇器(ColorPicker)需要了解更多的朋友可以參考下
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>
復(fù)制代碼 代碼如下:
<?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
復(fù)制代碼 代碼如下:
<item name="android:textColor">@color/primary_text_yellow</item>
相關(guān)文章
Android筆記之:深入為從右向左語(yǔ)言定義復(fù)雜字串的詳解
本篇文章是對(duì)Android中為從右向左語(yǔ)言定義復(fù)雜字串進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-05-05Flutter中嵌入Android 原生TextView實(shí)例教程
這篇文章主要給大家介紹了關(guān)于Flutter中嵌入Android 原生TextView的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-09-09Android TextView使用SpannableString設(shè)置復(fù)合文本的方法詳解
這篇文章主要介紹了Android TextView使用SpannableString設(shè)置復(fù)合文本的方法,結(jié)合實(shí)例形式詳細(xì)分析了Android中SpannableString類的功能及相關(guān)用法,需要的朋友可以參考下2016-08-08Android實(shí)現(xiàn)調(diào)用系統(tǒng)分享功能示例的總結(jié)
這篇文章主要介紹了通過(guò)Android調(diào)用系統(tǒng)分享文本信息、單張圖片、多個(gè)文件和指定分享到微信、QQ,同時(shí)分享圖片和文字的功能示例,小編覺(jué)得挺不錯(cuò),一起跟隨小編過(guò)來(lái)看看吧2018-05-05Android中使用GridView實(shí)現(xiàn)仿微信圖片上傳功能(附源代碼)
由于工作要求最近在使用GridView完成圖片的批量上傳功能,我的例子當(dāng)中包含仿微信圖片上傳、拍照、本地選擇、相片裁剪等功能,如果有需要的朋友可以看一下2017-08-08