i have an edit text view , i want its border to be of blue color , only its border or outline to be blue not the complete edit text view .How to get blue border?Please help
You can use a shape drawable as a background for the edit text view. You can define it in an xml file in the res/drawable folder:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
<stroke
android:width="1dp"
android:color="#0000ff" />
</shape>
If you want to make the background variable depending on whether the edit text view has focus, etc., you can use the above as one element of a state list drawable.
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