2012-04-08 111 views
0

我正在開發一個Android應用程序。應用樣式EditText元素

爲了讓UI更具吸引力,我想縮小EditText文本並應用背景顏色和形狀。

我還必須能夠從EditText中刪除該元素。

看一看這個 Google plus App

回答

1

用這個作爲一個XML文件來圓你的EditText並設置爲任何你想要的顏色...

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> 
    <solid android:color="#eeffffff" /> 
    <corners android:bottomRightRadius="8dip" 
     android:bottomLeftRadius="8dip" android:topRightRadius="8dip" 
     android:topLeftRadius="8dip"/> 
</shape> 
+0

謝謝,但我不想申請edittext文本的樣式,編輯文本內容包含逗號分隔的文本。我想將樣式應用於它們 – siva 2012-04-08 18:07:55

+1

再次閱讀您的問題它在哪裏指定您希望編輯文本中的文本的樣式? – 2012-04-09 04:36:32