TableView
TableView copied to clipboard
Forcing sticky column header
Hi, I had an issue with the sticky column header, it does not work if I put it inside a complex fragment layout. But if I put it directly, like in Activity, the sticky does work
Nested complex layout
The nested complex layout (Activity)
<?xml version="1.0" encoding="UTF-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.widget.Toolbar>
<LinearLayout />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
<com.google.android.material.tabs.TabLayout />
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout>
<ViewPager />
<!-- The fragment is added inside view page -->
<androidx.core.widget.ContentLoadingProgressBar />
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
The nested complex layout (Fragment)
<RelativeLayout>
<com.google.android.material.appbar.AppBarLayout>
<include />
</com.google.android.material.appbar.AppBarLayout>
<include />
<ViewFlipper>
<LinearLayout>
<com.evrencoskun.tableview.TableView />
</LinearLayout>
</ViewFlipper>
</RelativeLayout>
The simple layout
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout>
<com.google.android.material.appbar.AppBarLayout>
<include />
</com.google.android.material.appbar.AppBarLayout>
<include />
<ViewFlipper>
<LinearLayout>
<com.evrencoskun.tableview.TableView />
<include />
</LinearLayout>
</ViewFlipper>
</RelativeLayout>
Is there some kind of a way to force it sticky, either programmatically or through XML? If it's through XML, how to do it? Since the XML itself had so many layers. Thanks
I face same issue, did you solve it?