I am using TonicArtos/StickyGridHeaders library and my StickyGridHeadersGridView is placed inside a RelativeLayout. The problem is, attributes I used in layout XML for StickyGridHeadersGridView is not working because of which ScrollBar is appearing above the grid view items

android:layout_above
android:layout_below
android:layout_toRightOf

I am getting output as follows

enter image description here

Workaround Solution:

To resolve this issue I have to wrap the StickyGridHeadersGridView inside FrameLayout and I applied the above mentioned attributes to this FrameLayout and it worked just fine BUT FrameLayout here is unnecessary since it will add an Another view in view hierarchy.

有帮助吗?

解决方案

It seems like this bug is resolved after replacing the following two lines in StickyGridHeadersGridView.java (line no 887)

canvas.restore();
canvas.restore();

with

if (mHeaderBottomPosition != headerHeight) {
    canvas.restore();
}
canvas.restore();

Thanks to TonicArtos/StickyGridHeaders Issue #55

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top