lawloretienne / QuickReturn

Showcases QuickReturn UI Pattern as either a header, footer, or both header and footer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitter demo pager tab and footer auto disappeared issue

longkai opened this issue · comments

In the Twitter demo app, when scroll to the centre page, the tab quick disappear.

also, the bottom got some problems. When you leave the "HOME" page which show the footer, and go to the "Activity" page, the footer disappeared.

Please Fixed, Thanks in advance. I really appreciate what you did.

Hey @longkai , thanks for reporting these two issues. The first thing you reported, does not seem to be a problem, as you scrolldown on the Twitter screen, the tabs should disappear as they do in the official Twitter app.

That second thing you reported I am looking into.

Hi, happy to receive your response. The fist thing, I mean, I just swipe right to the centre page, the tabs quickly slide up and disappear, not scroll down.

btw, I have used your lib in my project and I suppose the QuickReturnListViewOnScrollListener should have a ability to take other OnScrollListener(s), because the list view often needs a load more on bottom. I have simply changed your code to do that. I suppose the lib needs to provide the ability.

Thanks!

As for the first issue, I will try to clear some things up. The twitter screen as with other screens that contain multiple tabs, are using a ViewPager. When you change pages of the ViewPager, from let's say the first tab to the second tab, the previous position (height of the tabs when on the second page) should be preserved. If this is not happening, then there is an issue.

Can you explain a little more about the second concern? What do you mean by the QuickReturnListViewOnScrollListener should have the ability to take other OnScrollListener(s)? Could you provide a code snippet to help demonstrate your point?

sorry for the delay.

The first should not be a concern. The ViewPager has a method called setOffscreenPageLimit, with default value 1, which means when we scroll the tab from the first to second(in order), the two page will be preserved but from the first to the third page and go back to the first page and the first page would reconstruct. But setting the value to 2, that will be ok(but it takes more memory). It seems I made a mistake, sorry.

The second concern. For example, the QuickReturn widget needs to detect the list' s scroll listener to to make the quick return behaviour which is fine. However, like the Twitter' s timeline, when scrolling to the bottom, the list should load more tweets which also needs to detect the list' s scroll listener. The both will conflict and only the last OnScrollListener listener will call.

So, my solution is to provide a List<AbsListView.OnScrollListener> field in the QuickReturnListViewOnScrollListener which allow others register other OnScrollListener(s). Finally, iterator the list and perform its onScrollStateChanged and onScroll method in QuickReturnListViewOnScrollListener.

sorry for my english...

Thanks for the feedback. That is very informative. If you believe you have
a potential solution then you can submit a pull request and I can review
your changes.
On Sep 9, 2014 9:42 AM, "龙凯" notifications@github.com wrote:

sorry for the delay.

The first should not be an concern. The ViewPager has an method called
setOffscreenPageLimit, default value is 1, which means when we scroll
the tab from the first to second(in order), the two page will be preserved
but from the first to the third page and go back to the first page and the
first page would reconstruct. But your set the value to 2, that will be
ok(but it takes more memory). It seems I made a mistake, sorry.

The second concern. For example, the QuickReturn widget needs to detect
the list' s scroll listener to to make the quick return behaviour which
is fine. However, like the Twitter' s timeline, when scrolling to the
bottom, the list should load more tweets which also needs to detect the
list' s scroll listener. The both will conflict and only the last
OnScrollListener listener will call.

So, my solution is to provide a List<AbsListView.OnScrollListener> field
in the QuickReturnListViewOnScrollListener which allow others register
other OnScrollListener(s). Finally, iterator the list and perform its
onScrollStateChanged and onScroll method in
QuickReturnListViewOnScrollListener.

sorry for my english...


Reply to this email directly or view it on GitHub
#6 (comment)
.

Sorry for the delay again.

The pull request has been submitted.

Thanks!

@longkai is this still an issue?

It's not. Sorry for the delay, once again.