android - AppBarLay's onOffsetChanged outInfinite execution -


mappbarlayout.addonoffsetchangedlistener(new appbarlayout.onoffsetchangedlistener() {         @override         public void onoffsetchanged(appbarlayout appbarlayout, int verticaloffset) {             float percentage = (float) math.abs(verticaloffset) / (float) appbarlayout.gettotalscrollrange();             int color = (int) evaluator.evaluate(percentage, color.white, color.blue);             mtablayout.settabtextcolors(color, color);         }     }); 

if listener callback add tablayout.settabtextcolors method, callback executed indefinitely. please tell me why? , how use percentage in callback dynamically change title color of tablayout??


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -