This is my code.
finalteamcount.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
String qwq = dataSnapshot.getValue(String.class);
if (qwq == null){finalteamcount.setValue(one);}
if (qwq == one){finalteamcount.setValue(two);}
if (qwq == two){finalteamcount.setValue(three);}
if (qwq == three){finalteamcount.setValue(four);}
}
It Directely set four, the value i am retriving is null
Aucun commentaire:
Enregistrer un commentaire