我们如何在android中使用粗边框(某种颜色)和白色背景制作EditText?

Ash*_*mar 1 android styles android-edittext android-styles

我得到了一些代码,但没有得到 -

<shape xmlns:android="http://schemas.android.com/apk/res/android" 
       android:thickness="0dp" 
       android:shape="rectangle">

  <stroke android:width="2dp"
         android:color="#00cc33"/>

</shape>
Run Code Online (Sandbox Code Playgroud)

它提供边框颜色,但背景颜色为黑色.提前致谢...

Mat*_*anG 5

使用此选择器作为EditText的背景

<shape xmlns:android="http://schemas.android.com/apk/res/android" 
       android:thickness="0dp" 
       android:shape="rectangle">
 <solid android:color="#FFFFFF" />
  <stroke android:width="2dp"
         android:color="#00cc33"/>

</shape>
Run Code Online (Sandbox Code Playgroud)