firebase - android TextWatcher with ListView refresh everytime -


i'm trying highlight row in listview every time changes realtime database (firebase). works semi correctly, because when change on position "1" highlight correct, next change e.g. position "2", , both positsions (1 , 2) highlighted, etc. rather comparing (current object field charsequences) in if statement incorrect, think so, have no idea how properly.

public view getview(final int position, view convertview, final viewgroup parent) {     ... ... public void ontextchanged(charsequence s, int start, int before, int count) {             if ((user.name.equals(s.tostring())) == false) {                   finalconvertview.setbackgroundcolor(color.green);                 new countdowntimer(500, 100) {                      public void ontick(long millisuntilfinished) {                      }                      public void onfinish() {                         finalconvertview.setbackgroundcolor(color.white);                      }                 }.start();              }          } 

i solve this, addingfinalconvertview.setbackgroundcolor(color.white);

between if statement , finalconvertview.setbackgroundcolor(color.green);


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -