I have created a list view to populate under a tab using listfragment as shown below. But i need to also write code to Show content text as "No Files on this tab" when the list returns empty. Is there a way to do this?
if(recordList.size()>0){
recordList = db.getRecordData();
while (count <= recordList.size()) {
HashMap<String, String> map = new HashMap<String, String>();
map.put(SUBJECT, recordList.get(index).getSubject());
map.put(ADDRESS, recordList.get(index).getAddress());
map.put(BUSINESS, recordList.get(index).getbusinessName());
myList.add(map);
count++;
index++;
}
ListAdapter adapter = new SimpleAdapter(getActivity(), myList, R.layout.record_item, new String[] {SUBJECT, ADDRESS, BUSINESS }, new int[] { R.id.subject, R.id.address , R.id.business });
setListAdapter(adapter);
ListView listView = getListView();
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
....
});
}