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
        );
4

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

2 Comments

This is pretty inefficient when those rows can be excluded as part of the initial query
Could you give me a code to execute , i m new to android. i dont have experience in this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.