خرید بک لینک

Vote count: 0

i have view pager . view pager have 3 section/tabs which have same fragments .fragment contains recycleview. in recyclerview i have custom layout for row . row contain textview and imagers . for textview its timer which should update every 1 sec . so for now i am using timer with fixe schedule task

 Timer timer = new Timer();
  timer.scheduleAtFixedRate( new TimerTask() {
        public void run() {

             textview.settext(updatedvalue);

         }
        }, 0, 1000);

i am doing this in bindViewHolder . but now problem is this timer is applicable for only few rows of recycle view . so in this it always call inrespect of that row is visible or not

so say i have total 30 rows and timer is applicable for 1st 4 row (this can be any value depend upon server value) . so how i can do this updating stuff for that row only . which my code is happing for all row so its taking to much memory

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 11 ارديبهشت 1395 ساعت: 10:43

صفحه بندی