android - setVisibility not working -
this question has answer here:
- how compare strings in java? 23 answers
i trying hide button if logged in user donor. have code this.
string typ = user.get("type").tostring(); log.d("before checking type", typ); if (typ == "donor"){ ne.setvisibility(view.gone); //ne.setenabled(false); }
in log, result donor
, know call database working. button need hide, doesn't hide. knows why?
change to:
if (typ.equals("donor"))
Comments
Post a Comment