I am using a toolbar with an elevation of 4dp. The shadow below the toolbar isn't generated on devices older than v21. I can, of course, approximate the shadow with custom drawable but where is the exact code or drawable (XML or 9-patch) in android SDK that produces shadow under toolbar on 21 and newer devices?
Asked
Active
Viewed 76 times
0
-
See [this](http://stackoverflow.com/a/30962710/1083957) answer. – azizbekian Feb 27 '17 at 07:20
-
@azizbekian it didn't work for me plus I don't want to use that workaround. – Mehmed Feb 27 '17 at 08:30
1 Answers
0
Why do you need that file exactly?
You may just add shadow by putting it in the view with content that is under your toolbar.
@drawable/mShadow
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="@android:color/transparent"
android:endColor="#88333333"
android:angle="90"/>
</shape>

Artem Dobrovinskiy
- 53
- 7