2

I am working on android tv using leanback. I want visible fading shadow for highlighted item in browse fragment row item.I am getting shadow when i change the below values

<dimen name="lb_material_shadow_normal_z">10dp</dimen>
<dimen name="lb_material_shadow_focused_z">40dp</dimen>
<dimen name="lb_material_shadow_details_z">60dp</dimen>

But this also not giving a bright shadow.Is there any way to customize color of leanback shadow or increase the thickness of shadow.

I need this type of shadow overlapped between row items

enter image description here

1 Answers1

1

Based from this thread, the recommended way of customizing the leanback's components is through overriding the styles and dimens. You need to create your own views and your own view presenters (instead of using their ImageCardView). With that you could set your own shadows at the presentation level.

Also, according to this documentation, if you want to change the shadow effect for ListRow, you can modify Presenter class. setShadowEnabled method is used to enable/disable shadow effect.

abielita
  • 13,147
  • 2
  • 17
  • 59