Cleveroad / AdaptiveTableLayout

Library that makes it possible to read, edit and write CSV files
MIT License
1.9k stars 234 forks source link

Behavior with AppBarLayout #23

Closed formatBCE closed 2 years ago

formatBCE commented 6 years ago

Trying to use this lib together with AppBarLayout, to scroll Toolbar up before scrolling view itself. For this, i wrapped table containing layout to NestedScrollView, but can't achieve proper work - looks like TableLayout does not support such behavior. Could you please take a look?

tifezh commented 6 years ago

@formatBCE Did you solve it?

formatBCE commented 6 years ago

@tifezh yes, i managed to make it working by forking and digging into code. You may see my fork https://github.com/formatBCE/AdaptiveTableLayout, but be aware, that a lot was changed there to support dynamic data sets as well.

tnam0x commented 6 years ago

Could you tell me what part of code you changed to fix this issue?

formatBCE commented 6 years ago

@namtran4194 sorry for late response - had busy days. Changes were made in AdaptiveTableLayout class:

  1. @Override public boolean onDown(MotionEvent e) { // stop smooth scrolling if (!mScrollerRunnable.isFinished()) { mScrollerRunnable.forceFinished(); } startNestedScroll(ViewCompat.SCROLL_AXIS_VERTICAL); return true; } here "startNestedScroll" was added.

  2. "scrollBy" method fixed - without that fix nested scroll was laggy as hell.

  3. All rows regarding to NestedScrollingChildHelper were added - field and methods, look at the end of file.

  4. "onScroll" and "onFling" methods.

I suppose, it's enough to get it working. If there's any troubles - inform me please, i will continue to dig.

yarovoiag commented 5 years ago

Hi @formatBCE, thx for using this library. I see you did a good job )) Feel free to create pull request. We will integrate this changes in our library. With best regards Cleveroad team.

formatBCE commented 5 years ago

Hey @yarovoiag! Will make it asap, thanks! :)