0

Like this

I found tutorial here

but is it not exactly like google now edit text box.

How to make drop shadow on edit text like google now.

Now my code is

    <shape android:shape="rectangle">
        <padding android:bottom="1dp" />

        <gradient
            android:angle="90"
            android:centerX="20%"
            android:centerColor="#878686"
            android:startColor="@android:color/transparent"
            android:endColor="@android:color/transparent"
            android:type="linear"
            />
        <corners android:radius="8dp" />
    </shape>
</item>


<item
    android:left="0dp"
    android:right="0dp"
    android:top="0dp"
    android:bottom="10dp">
    <shape android:shape="rectangle">
        <solid android:color="@color/pure_white_transparent"/>
        <corners android:radius="2dp" />
    </shape>
</item> </layer-list>
Myo Min Han
  • 1,633
  • 2
  • 12
  • 12

1 Answers1

0

Add below code in your edittext :

   android:shadowColor="#0000ff"
   android:shadowDx="2"
   android:shadowDy="4" 
VVB
  • 7,363
  • 7
  • 49
  • 83