emilsjolander / StickyScrollViewItems

A small android library for tagging views inside a ScrollView as "sticky" making them stick to the top of the scroll container until a new sticky view comes and takes it's place
Apache License 2.0
1.03k stars 262 forks source link

android:tag="sticky" is not working on custom layouts using <include /> #30

Open tomasro27 opened 9 years ago

tomasro27 commented 9 years ago

I built a custom layout for a header. From my activity layout I am using that custom layout (which is in another xml file). I am using the layout with

< include layout="@layout/event_item" android:id="@+id/eventInfoHeader" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:layout_width="match_parent" android:tag="sticky" />

However, it doesn't recognize the sticky.

Note: By wrapping this include layout inside a LinearLayout I was able to set the android:tag="sticky" and it worked. However, it required this extra step and nested layouts.

mehul0 commented 6 years ago

I facing the same issue.