0

I want to choose only NON NULL String from String[] groupFrom = new String[]{Database.DATABASE_GROUP_1};

to pass to the adpater:

  SimpleCursorTreeAdapter simplecursortreeAdapter = new ExpandableListViewAdapter(
                this,
                cursor,
                R.layout.list_group,
                groupFrom,
                groupTo,
                R.layout.list_child,
                childFrom,
                childTo
        );
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Errahbi Zouhair
  • 99
  • 2
  • 10
  • 2
    check this https://stackoverflow.com/questions/31372918/android-sqlite-query-where-column-is-not-null-and-not-empty – Sachin Rajput Jul 30 '18 at 12:54
  • Possible duplicate of [Android SQLite query where column is not null and not empty](https://stackoverflow.com/questions/31372918/android-sqlite-query-where-column-is-not-null-and-not-empty) – Michael Dodd Jul 30 '18 at 12:56
  • It is not .i've tried what was suggested but it doesnt work for me, i have different design , i have edited the text so you can see my design structure . do you think i can apply what was suggested in the link for me? and how with code please – Errahbi Zouhair Jul 30 '18 at 13:03
  • i m new to android so i have based on this to create what i want which is expendable listview with prepopulated Sqlite database : https://github.com/JorgeAmVF/android-prepopulated-sqlite-database/blob/master/app/src/main/java/com/jorgeamvf/prepopulatedsqlitedatabase/MainActivity.java My design structure is exactly like this – Errahbi Zouhair Jul 30 '18 at 13:09

1 Answers1

0

Loop through with something similar to:

if (groupform[i] != null)
// Do stuff

I'm adapting this from here:

How can I check whether an array is null / empty?

Jonah Mann
  • 23
  • 5