欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android中EditText和AutoCompleteTextView設(shè)置文字選中顏色方法

 更新時(shí)間:2015年01月17日 09:51:55   投稿:junjie  
這篇文章主要介紹了Android中EditText和AutoCompleteTextView設(shè)置文字選中顏色方法,本文給出了效果圖和實(shí)現(xiàn)代碼,需要的朋友可以參考下

EditText和AutoCompleteTextView設(shè)置文字選中顏色 大多數(shù)Android Rom上,文本選擇的背景色都是很好看的鮮綠色, 但是在某些垃圾的三星手機(jī)上,居然是藍(lán)色,令人惡心反感,其實(shí)完全可以通過程序來(lái)修改,文本的默認(rèn)選中背景色.

所用API解釋

復(fù)制代碼 代碼如下:

android:textColorHighlight Color of the text selection highlight.

EditText設(shè)置效果

AutoCompleteTextView 設(shè)置效果

實(shí)現(xiàn)代碼

復(fù)制代碼 代碼如下:

<?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" >
    <EditText
      android:id="@+id/et_inputBox"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      android:textColorHighlight="#B4DF87"
        />

    <AutoCompleteTextView
        android:id="@+id/act_input"
        android:layout_below="@id/et_inputBox"
        android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:textColorHighlight="#B4DF87"
        />
</LinearLayout>

相關(guān)文章

最新評(píng)論