You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've enclosed my linear layout with a maskable layout to mask the rounded edges. Within said linear layout contains a recycler view that has an item view with its elevation attribute set. Somehow, the shadows disappeared when I enclosed this linear layout within the maskable layout.
From the layout code above, the original recycler view without the maskable layout allowed the elevation attribute for one of the items in the recycler view to render the drop shadow. However, when I enclosed it within the maskable layout, the shadows disappeared. Here's the view xml for the recycler view item:
Hey all, sorry I seem to have not seen this at all.
Yes the mask layout will probably clip the shadows.
There is no automatic provide correct shadow masking from the mask provider.
However, this should fix it: https://developer.android.com/training/material/shadows-clipping
You can provide the shadow path with a ViewOutlineProvder as suggested on the documentation.
That should solve your problem :)
I've enclosed my linear layout with a maskable layout to mask the rounded edges. Within said linear layout contains a recycler view that has an item view with its elevation attribute set. Somehow, the shadows disappeared when I enclosed this linear layout within the maskable layout.
</com.christophesmet.android.views.maskableframelayout.MaskableFrameLayout>
Here's the original recycler view without the maskable frame layout:
From the layout code above, the original recycler view without the maskable layout allowed the elevation attribute for one of the items in the recycler view to render the drop shadow. However, when I enclosed it within the maskable layout, the shadows disappeared. Here's the view xml for the recycler view item:
Note the linear layout contains elevation attribute set.
The text was updated successfully, but these errors were encountered: