Q:

How to display no result in the page if no list is added?

In my upper right corner of my activity, it has a + button used to add new list. For first time user, I want the page display no result if there are no list. If it has list added, it will shows the list and **no result* will dismiss. Can someone tell me how to achieve this ?
I know how to create list/listView, just want to know how to make the **no result*  disappeared if new list is added. Do I need to use two xml and two different pages ? Thanks...

A:

Try this,
listModel is my model in which I have added my data to be fetched, so check that model and simply set the visibility accordingly to that.
if (listModel.size() == 0) {
                txtNoData.setVisibility(View.VISIBLE);
                lstView.setVisibility(View.GONE);           
            }
            else {
                txtNoData.setVisibility(View.GONE);
                lstView.setVisibility(View.VISIBLE);
            }

