TableView icon indicating copy to clipboard operation
TableView copied to clipboard

Forcing sticky column header

Open bobbyirawan09 opened this issue 4 years ago • 1 comments

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

bobbyirawan09 avatar Jan 18 '22 06:01 bobbyirawan09

I face same issue, did you solve it?

kurniawanrizzki avatar Jun 24 '24 08:06 kurniawanrizzki