Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forcing sticky column header #400

Open
bobbyirawan09 opened this issue Jan 18, 2022 · 1 comment
Open

Forcing sticky column header #400

bobbyirawan09 opened this issue Jan 18, 2022 · 1 comment

Comments

@bobbyirawan09
Copy link

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

@kurniawanrizzki
Copy link

I face same issue, did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants