As the title says, I've seen EditTexts where they are just plain white with no smooth corners or orange android border when you highlight it etc.
Like it looks in this app: http://s1.appbrain.com/screen?id=-2631427781674403509&i=1
Show activity on this post. To change Edittext's underline color: Then change the “colorAccent” to whatever the color you want your EditText line color to be.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. We can change color as per project requirement.
Plaintext is nothing but the Edittext. It has changed the name in Android studio but if you check into Design view you will get to know that it still has name of Edittext only. Usages. Textview : should be used for uneditable text which user wants to read but not to manipulate.
You need to create a custom background 9-patch image like this one and put it to /res/drawable
directory. Here is the tutorial for 9-patch images. Then you need to apply the image as a background for your EditText
using android:background
attribute.
Here is a sample layout xml:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white_bg"
android:text="Test"
android:layout_marginBottom="5dip" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white_bg"
android:text="Currently focused" />
And here is the result:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With