0

How we can do this like the below image on EditText and Button in material design on Android ?

enter image description here

Cheers!

Zied R.
  • 4,964
  • 2
  • 36
  • 67

3 Answers3

1

Create a xml with the below code in drawable and set it as your edittext bg..

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#00FFFFFF"/>
<corners
    android:bottomRightRadius="20dp"
    android:bottomLeftRadius="20dp"
    android:topLeftRadius="20dp"
    android:topRightRadius="20dp"/>
 <stroke android:width="1dp" android:color="#FFFFFFFF" />
</shape>
Rishad Appat
  • 1,786
  • 1
  • 15
  • 30
0

You may find what you want here:

http://developer.android.com/guide/topics/ui/controls/button.html#Style

0

Use this xml for the EditText, remove transparent and add color for Button:

<?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient android:startColor="@android:color/transparent"
        android:endColor="@android:color/transparent"
        android:angle="270" />
    <corners android:radius="30dp" />
    <stroke android:width="5px" android:color="@android:color/white" />
 </shape>
Logic
  • 2,230
  • 2
  • 24
  • 41