saulmm/onboarding-examples-android

Placeholder not working as expected

Opened this issue · 3 comments

Hi, I was playing with your OnboardingWithPlaceholderActivity and I found the layer-list drawable that you use for the placeholder doesn't render as what is shown in your post. The whole screen is blue instead of having the height you specify.

After some experiments, I was able to fix the problem by swapping the order of the items in the layer-list drawable (grey color on top of blue color) and set a top offset for grey which equals to the height of the toolbar. I don't know why setting a height for item in layer-list doesn't work for me.

Here's a gif for the bug I see: http://g.recordit.co/d4SYFvzlTU.gif

Unfortunately, this workaround introduces overdraw as the blue color is filling up the whole screen below the grey color...

It's seems only work on Android version above Marshmallow.
Just preview ll_toolbar_placeholder.xml Android Studio will render the result.