0

I have a slidermenu which is generated using a listView. This Listview is placed inside a DrawerLayout. I want to add a drop shadow effect to the ListView. Can anyone tell me step by step what to do?

anu_r
  • 1,602
  • 7
  • 30
  • 61

1 Answers1

0

What I'm getting from the question is that you wanna add a shadow to the navigation drawer menu.

Here is the sample

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawerlayout); // referring the drawer layout from the xml file

drawer.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); //setting the drawer shadow

Make sure you put the nine-patch drawable drawer_shadow.9.png inside your drawable folders. You can find the image in sdk folder android-sdk\extras\android\support\samples\Support4Demos\res .

zavione
  • 919
  • 1
  • 7
  • 14