Home > Mobile >  Litepal how feedback no query to the data
Litepal how feedback no query to the data

Time:09-17

List The users=LitePal. Where (" phone like?" That phone. GetText (). The toString ())
The (User. The class);
If (the users==null) {
Toast. MakeText (Login. This, "without the user, please register first," Toast. LENGTH_SHORT), show ();
break;
}
This is my written judgment conditions but did not work

CodePudding user response:

If (the users==null & amp; & Users. The size ()=0) {//Toast//}

Query operation returns an empty list, and the user==null judgment is whether the object is empty, but the users have been assigned, the object is not null, is content is empty,
  • Related