Code example for BaseAdapter

Methods: isEmptynotifyDataSetChanged

            BaseAdapter adapter = mAdapter.get();
            if (adapter == null) {
                // The adapter is no longer in use 
            if (!adapter.isEmpty()) {
            } else { 
                // The adapter is empty or no longer in use. 
                // It is important that BaseAdapter#notifyDataSetChanged() 
                // is not called when the adapter is empty because this 
                // may indicate that the data is valid when it is not. 
                // For example: when the adapter cursor is deactivated. 
    private static final class BaseExpandableListAdapterCallback implements ImageCallback { 
        private final WeakReference<BaseExpandableListAdapter> mAdapter;