I am populating a spinner from a DB. It works great. Except that if that part of the DB has not been filled out yet and the spinner is empty. That is a problem when someone tries to append to that part of the DB with a blank spinner, you get a nullpointerexception. I have tried all kinds of variations of
if (spinner == null) {warn the person and finish()}
Or
if (spinner.equals(""){warn the person blah blah blah}.
Any Solution?
If you work with the DB, you probably use a
Cursorobject. Can you not check the count of object in theCursorwithc.getCount()?