Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android DataBinding : View flickering

I am using GridView with image items, loading image via Android DataBinding technology. If add some new item to list and notify the adapter then the GridView gets flickering why its occur ? if i am not using DataBinding technology then its work fine.

like image 821
Arun Avatar asked Feb 19 '16 11:02

Arun


1 Answers

If you are using data binding in a list, you should always call executePendingBindings() - this causes the binding to execute immediately, rather than wait for the next frame (which is what causes the flickering).

like image 138
ianhanniballake Avatar answered Oct 21 '22 22:10

ianhanniballake