android


RecyclerView notifyItemChanged Prevent Scroll [duplicate]


This question already has an answer here:
notifyDataSetChanged() makes the list refresh and scroll jumps back to the top
4 answers
I have some data in a RecyclerView that's readily available and some data that takes some time to load. So what I'm trying to do is immediately display the available data and only update records that have additional data once it's done loading. I'm able to achieve this via notifyItemChanged(position) however the RecyclerView scrolls to the top every time the method is called. Is there a way to prevent the scrolling from happening anytime data is only being updated and not inserted/removed?
I figured it out, I wasn't calling notifyItemChanged from the UI thread. Once I moved it to there it works as intended.
notifyDataSetChanged() makes the list refresh and scroll jumps back to the top

Related Links

How do I start a new Activity with an if-statement?
Android Selectable TextViewer SetHighlightedText
StaggaredGridLayoutManager not working properly
Handle ListView/ListViewItem click in layout.xml onClick
Application in Android studio is stopping automatically while debugging
How to change ListView Item's background when onLongClick if adapter extends CursorAdapter
where is the proguard mappings.txt file generated when using JACK?
android: how can I get alphabetic name of SMS sender?
How to create a Fragment over the Viewpager in android?
ViewPager obj is null even though it initilized correctly and also present in the defined layout xml
Button On X & Y coordinates of Image
How can fix cpu doesn't support required features (vt-x or svm) for AMD CPU
Socket.io client in android connection with HTTPS protocol failed?
findViewById() method returning null object on some devices
RecyclerView swipeToDismiss Only partial row to be swiped with delete button
Share image on Twitter with TweetComposer?

Categories

HOME
batch-file
facebook-oauth
api
polymer
android-studio-2.2
phpmyadmin
mjml
themes
google-cloud-functions
edge
ado.net
interpolation
jtextpane
title
ycsb
datastage
openbugs
enterprise-architect
flash-player
selectize.js
keytool
entitymanager
mathprog
asp.net-mvc-viewmodel
google-picker
sse
connector
topology
ag
mount
stackexchange
flooding
linked-data
wcag
comparable
google-cast
gitlab-api
python-2.6
kodi
watchman
node-mssql
c9.io
signals-slots
watchface
glm-math
print-css
ovf
cnc
vugen
tinkerpop
skin
janus
trigger.io
bootstrap-tags-input
hadoop-2.7.2
tooleap
simevents
refinerycms
qiime
spreadjs
thread-sleep
mod-proxy
zscript
fits
infosphere-spl
rapidsvn
iiop
ghcjs
imagefilter
cbind
tweenlite
winginx
tinyxml
spring-remoting
android-framework
cfcache
git-repo
scriptaculous
scrypt
unit-of-work
tlf
merb
css-reset
wp7test
vfs
wcf-configuration
lambdaj
node-redis
flex-mobile
listactivity
socketserver
svk
cac
isapi-extension
application-verifier
software-lifecycle
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App