-
Notifications
You must be signed in to change notification settings - Fork 807
if section pinned view is not TextView will has show problem #27
Comments
i got the same problem |
Any solution found ? |
i got the same problem when i set gravity center in textview |
I think my problem is the same. In my getView from the adapter I inflate a layout where I have a textview inside a LinearLayout. In my vanilla listview everything worked fine, except the section row would not stick to top. After implementing the pinnedlistview, the pinned section, instead of mantaining the row size it previously had (defined by the LinearLayout surrounding the TextView), would cut the row height (compairing with the example provided here, I noticed that this new height appeared after pinnedView.measure(ws, hs); inside createPinnedShadow). After some debugging and a bit of luck, I found that if in my TextView I changed the heigh from wrap_content to a fixed height everything worked fine. I am not sure why this occurs since the LinearLayout surrounding the textview has that same fixed height... Anyway it solved my problem |
When I dig into the library, I found out that if the section is a Layout, its position of Y will changed to negative when scroll over top. So we can not see this section when draw. I'm not digging further after this, so I just apply a quick & dirty fix to my project to fix this issue. That is, translate the canvas in
Hope the author or anyone else can fix the root cause of this issue. And before that, hope this solution can help you. |
I try in adapter getView return LinearLayout ,in this LinearLayout contain ImageView and TextView ,if not scroll, the section pinned item is right, but when i scroll the pinned item's TextView's text don't show , I try to changle when it is pinned Section ,when is pinned Section I return TextView and set text content, It is ok.
I hope the pinned section header can be other View not only TextView
The text was updated successfully, but these errors were encountered: