Comments (6)
Hi @sharmaraju352,
Thanks for reporting that issue. I'll take a look on that when I have some time.
from infinitescroll.
and one more thing..why it needs number_of_items to be in the table of MAX_ITEMS_PER_REQUEST. it crashes if i assign the number which is not in the table.
from infinitescroll.
"Max items per request" is a number of items per single "page". The library needs to know how many items it should load on start and when scroll reaches the bottom of the list of currently loaded items.
from infinitescroll.
yes i got that.but i am fetching my notifications from server and the number of notifications on the server is unknown initially.i am keeping MAX_ITEMS_PER_REQUEST=20 initially. if i detect that the number of notifications from server is less than MAX_ITEMS_PER_REQUEST then i am assingning the number of notification from server to MAX_ITEMS_PER_REQUEST.it is working flawlessly until this point.but the problem is if i have 21 notifications on my server then it will load first 20 but as soon as i scroll down it crashes.i am not able to change the value of MAX_ITEMS_PER_REQUEST dynamically.i want to assign MAX_ITEMS_PER_REQUEST=no_of_notifications_on_server%MAX_ITEMS_PER_REQUEST;
from infinitescroll.
how do i tell adapter about this change
from infinitescroll.
It's a separate problem. Please, create another issue for that.
Quick answer:
Now the library is not able to do that.
We can extend the library to allow to set max items per request inside InfiniteScrollListener
, but it will reduce code immutability. After that, you can listen to notifications from the server and set max items per request dynamically for the listener whenever you'll receive notification from the server.
from infinitescroll.
Related Issues (16)
- Prepare library for release
- Not loading items on Actual device HOT 1
- A problem with scrolling HOT 7
- Add unit test coverage report
- Release 0.0.2
- Error adding dependency in gradle HOT 5
- Recyclerview mismatch HOT 4
- bump dependencies and gradle version
- Release version 0.0.1
- Add animation showing how library can be used to README.md HOT 1
- Add another, more practical example of usage to README.md HOT 1
- release 0.0.3
- StaggeredGridLayoutManager HOT 1
- Add an example with loading items after click
- Best approach for using this library when using Retrofit and network is slow. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infinitescroll.