GithubHelp home page GithubHelp logo

larswerkman / quickreturnlistview Goto Github PK

View Code? Open in Web Editor NEW
698.0 698.0 187.0 841 KB

A implementation of Roman Nurik's and Nick Butcher's Quick Return UI patern for a listview.

License: Apache License 2.0

Java 100.00%

quickreturnlistview's People

Contributors

larswerkman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickreturnlistview's Issues

Animated quick return can incorrectly display the header placeholder.

When the animation hides the quick return element and the first list item is not at the top of the screen you can see the placeholder element.

Steps to reproduce:

  • Start example app.
  • Scroll up until half the word, "Android" in the first list item is no longer visible.
  • Scroll down, allowing the quick return to slide down, continuing until again the first list item is half covered.
  • Scroll up slightly.

The placeholder element in the header is now visible and selectable. My thinking is the quick return should only slide up until its bottom edge hits the top edge of the first list item.

Video

ListView rendering the whole set of rows

I came to a situation with the QuickReturnListView where I noticed that the ListViewadapter is loading the whole set of rows, for example I have ListView with 21 rows, I have traced getView method on the baseAdapter and I found it's loading the whole 21 rows sequentially where the ListView should only load the visible item.

I have tried to remove "getComputedScrollY" method from "QuickReturnListView" class and the ListViewis no longer loading the whole set.

Thanks.

List unscrollable with custom Adapter

I've tried using your code but it severely lags when using a custom adapter. Looping through every view in computeScrollY() and inflating tons of views seems terribly inefficient and I have no clue how this code could work.

Am I missing something or have you tested this on any other adapter?

Performance issue

Hello. I think In your example it will be better to add

aList.getViewTreeObserver().addOnGlobalLayoutListener(onGlobalLayoutListener)

on Activity or Fragment Resume and remove it

historyList.getViewTreeObserver().removeGlobalOnLayoutListener(onGlobalLayoutListe
ner);

on Pause.

ListView Performance

I tried using theQuickReturnListView, and my heavy UI does not lag so much. Did the QuickReturnListView made scrolling smooth?

AnimatedFragment for prior api 11 devices

Hi,

In the AnimatedFragment under the onScroll method, case RETURNING the function getTranslationY() is being used in the last else case,

else if (mQuickReturnView.getTranslationY() != 0 && !noAnimation)

which causes an exception on those devices

Calling setAdaptor after generated

Great work,

However when I was calling, setAdaptor once it has computedY it was erroring.

I have a button that allows people to add a new row.

The way round i found was to reset all varibles within QuickReturnListView.java

public void reset() {

    mItemCount = 0;
    mItemOffsetY = null;
    scrollIsComputed = false;
    mHeight = 0;

}

and call it before using setadaptor. This then recalculates without having to reload.

Thought i'd post incase someone has another idea or it helps someone

Blank area if list item count is less than screen height

When the number of items in the list doesn't take up the whole screen's height there is a blank area above the quick return view.

It seems to increase as the number of items increases from 1 up to finally filling up the screen.

screenshot_2013-11-05-13-41-27

Tabs and viewpager inside quickReturnView

Hi! How can I use this lib, but with the "tabs" inside the "sticky view" and the scrollview inside a viewpager ->

------------------------
|        header        |
------------------------
|     Tab (Sticky)     |
------------------------
|     ViewPager        |
|    --------------    |
|   | ScrollView 1 |   |
|   | ScrollView 2 |   |
|   | ScrollView 3 |   |

then
------------------------
|     Tab (Sticky)     |
------------------------
|     ViewPager        |
|    --------------    |
|   | ScrollView 3 |   |
|   | ScrollView 4 |   |
|   | ScrollView 5 |   |

It's posible? 

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.