I'm working on an Android TV application but I'm not quite happy with the standard shadow rendered by the VerticalGridFragment
, I'd like to have it smaller and a bit less darker.
I've searched through the code but I didn't find any full working solution.
In my VerticalGridPresenter
subclass, the only method I can override is createShadowOverlayOptions
but I can't get the result I want.
The only workaround I came up with is to define the following dimensions, so that the ones declared in the Support Library are overridden:
<dimen name="lb_material_shadow_details_z">3dp</dimen>
<dimen name="lb_material_shadow_focused_z">4dp</dimen>
<dimen name="lb_material_shadow_normal_z">3dp</dimen>
But it's more an hack rather than a proper solution.
This is the standard shadow:
This is the result I get with my current hack:
As you can I see, it's smaller but I cannot change the color.
Is there a proper way to set shadow color and dimension for VerticalGridFragment
and RowsFragment
classes?
I'm using latest Leanback version:
compile 'com.android.support:leanback-v17:25.2.0'
My minSdkVersion
is 17 because of a custom Android TV player, but it's fine to have it working starting from 21.