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

HTTP Post to Php isn't working
Showing autocompletetextview results as suggestions above keyboard
Crop an android canvas drawArc
How to connect SpeechRecognizer to RecognizerIntent with Extras
Getting an error when trying to create my own view class?
ProgressBar in AsyncTask - showing after onPostExecute method
Create different number of items inside a ListView Android
How can i insert memory info in a different layout in a textview in android
How to get old ARM for Android 2.2 (API 8)
tool to monitor the urls sent by the android application
Android ListFragment Runtime Error
Android using switchpreference to set color background
Android to ASP.NET Upload Savepath
Implementing video recorder, crashing app
Using local calendar in emulator
First and last EditText in ListView is showing the same value

Categories

HOME
phpword
api
polymer
c++11
eslint
apache-flink
flex
camera
ms-access-2016
javacc
rds
hugo
spring-session
jax-ws
performancepoint
pattern-matching
syntaxnet
mql5
ibeacon-android
redis-sentinel
xcodebuild
3nf
selectize.js
qsqlquery
android-7.0-nougat
google-data-studio
mapstruct
inno-download-plugin
interbase
gpio
quantlib
reverse
numpy-broadcasting
sessionstorage
visa
movilizer
dapper-simplecrud
geotiff
twilio-click-to-call
avx
janus
gpg-signature
ampps
pure-css
ziparchive
burrows-wheeler-transform
cfchart
concurrentmodification
qt5.2
forwarding
intel-c++
graphics2d
zxspectrum
java-security
deform
metatrader5
entry-point
strawberry-perl
cancellation
file-not-found
drupal-nodes
hibernate-entitymanager
ie8-compatibility-mode
code-duplication
away3d
merb
cascadingdropdown
onmousemove
azman
agility.js
quotation-marks
msr
nhprof
objective-j
load-time
ie-compatibility-mode
maven-1
easyb
dot-emacs
binomial-heap
glui
wcf-instancing
complex-event-processing
windows-identity
todos
leader
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