I want to create a 9-patch to simulate the 'elevation' effect on pre-5.0 devices, as ViewCompat.setElevation is broken. Is there a way to do this easily, based on the elevation property? As in, is there a way to generate a 9-patch for something with an elevation of 5dp, 20dp, etc.
Asked
Active
Viewed 449 times
0
-
You might want to try using a [LevelList Drawable](http://developer.android.com/reference/android/graphics/drawable/LevelListDrawable.html) – Phantômaxx Mar 25 '15 at 07:31
-
That's not quite that. I need a way to generate the 9patch to look like this elevation. Is that possible? – ollien Mar 25 '15 at 20:36
-
`@android:drawable/dialog_holo_light_frame` - this 9patch drawable simulates elevation effect. You can try to edit it. Check this answer: http://stackoverflow.com/a/30962710/1860858 – mata Jun 24 '15 at 10:27