Giter Club home page Giter Club logo

Comments (8)

lawloretienne avatar lawloretienne commented on August 20, 2024

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.

from quickreturn.

longkai avatar longkai commented on August 20, 2024

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!

from quickreturn.

lawloretienne avatar lawloretienne commented on August 20, 2024

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?

from quickreturn.

longkai avatar longkai commented on August 20, 2024

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...

from quickreturn.

lawloretienne avatar lawloretienne commented on August 20, 2024

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, "龙凯" [email protected] 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)
.

from quickreturn.

longkai avatar longkai commented on August 20, 2024

Sorry for the delay again.

The pull request has been submitted.

Thanks!

from quickreturn.

lawloretienne avatar lawloretienne commented on August 20, 2024

@longkai is this still an issue?

from quickreturn.

longkai avatar longkai commented on August 20, 2024

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

from quickreturn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.