larswerkman / quickreturnlistview Goto Github PK
View Code? Open in Web Editor NEWA implementation of Roman Nurik's and Nick Butcher's Quick Return UI patern for a listview.
License: Apache License 2.0
A implementation of Roman Nurik's and Nick Butcher's Quick Return UI patern for a listview.
License: Apache License 2.0
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:
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.
This happens when the adapter has been already set and then dynamically adding items to the list.
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.
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?
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.
what should i change in my code?
Just like in Holo Color Picker
I need It in recyclerview!
I tried using theQuickReturnListView
, and my heavy UI does not lag so much. Did the QuickReturnListView made scrolling smooth?
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
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
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?
I am plannig to use your lib but want to know if I can use both at the same time.
And again, like in Color Picker. ;)
When there is a padding on top of listView is present, scroll is not recognized.
I modified scrollY in your QuickReturnUtils .getScrollY(AbsListView lv) as "scrollY = -(c.getTop()) + lv.getPaddingTop();". Works fine now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.