Tuesday, January 8, 2019

Make corner shape Edit text in android


create a xml file in drawable and code like that:


<?xmlversion="1.0"encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners
android:bottomLeftRadius="10dp"
android:bottomRightRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>

<!--forpadding-->
<stroke
android:width="1.5dp"
android:color="#000"/>

<solid
android:color="#fff"/>

then in your edit text make the background this drawable xml file.

you can also use it in button, textView, imageView and many more widgets in android studio.

</shape>

No comments:

Post a Comment

Speedup Android Studio

Go to Help ->Edit Custom VM Options, and chnge this 4 setting. After that close your Android Studio. This settings are for 8gb of ram pc...