1

I am trying to add a drop shadow to a textview that has its background set to a drawable to give it rounded corners. This is the effect I am trying to get: https://drive.google.com/file/d/0B_krkpxyd558NkhjMmdQZUdlc2c/view?usp=sharing

And this is how it currently looks: https://drive.google.com/file/d/0B_krkpxyd558UHE2YU5ENWhxWUE/view?usp=sharing

This is the current background set to the textview:

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

    <stroke
        android:width="1dp" android:color="@color/white"
         />

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

    <padding
        android:left="1dp"
        android:right="1dp"
        android:top="1dp" />

    <corners android:radius="5dp" />

</shape>

I have seen other guides showing how to add a drop shadow to views by setting a custom background, but I can't seem to find a way of combining both a drop shadow and rounded corners.

Any help would be much appreciated.

Kaushik
  • 6,150
  • 5
  • 39
  • 54
Fishingfon
  • 1,034
  • 3
  • 19
  • 33

2 Answers2

1

Try the following links,

Android View shadow

Designing EditText with rounded corners & inner shadow

This links surely helps you :)

Community
  • 1
  • 1
stacktry
  • 324
  • 3
  • 24
-1
text shadow : 1px 5px 2px rgba(0,0,0,0.6);
kylieCatt
  • 10,672
  • 5
  • 43
  • 51