3

I'm developing a APP with a Sliding Pane and works correctly, but I dont know how I can put a shadow like Hangouts Google APP.

It's a bit hard to explain, see this:

enter image description here

Im trying to use setShadowResource, but I dont know how to design the shadow in nine patch. Thanks for the help!

EDIT: I'm trying to create a shadow using a shape with gradient, but dont works :|

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

<gradient
    android:centerColor="#8B0000"
    android:endColor="#34FFDD"
    android:startColor="#FF00FF" />

</shape>

Activity:

    mPanes.openPane();
    mPanes.setShadowResource(R.drawable.es_slidingpane_shadow);
    mPanes.setSliderFadeColor(Color.parseColor("#FFFFFF"));
edwin
  • 7,985
  • 10
  • 51
  • 82
Hypnotize
  • 143
  • 2
  • 17

1 Answers1

7

you need to set width and height to your drawable:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
    android:centerColor="#8B0000"
    android:endColor="#34FFDD"
    android:startColor="#FF00FF" />
<size android:width="5.0dp" android:height="0.5dp" />
</shape>
sweetrenard
  • 91
  • 1
  • 7