Adapter isEmpty - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Adapter isEmpty method.

This code example shows how to use the following methods:isEmpty
  public boolean hasStableIds() { 
    return(delegate.hasStableIds());
  } 
   
  public boolean isEmpty() { 
    return(delegate.isEmpty());
  } 
   
  public int getViewTypeCount() { 
    return(delegate.getViewTypeCount());
  } 
   
  public int getItemViewType(int position) {
    return(delegate.getItemViewType(position));
  } 
   
  public void unregisterDataSetObserver(DataSetObserver observer) {
    delegate.unregisterDataSetObserver(observer);
  } 
   
7
CodeRank
This code example shows how to use the following methods:isEmpty
        final boolean focusable = !empty || isInFilterMode();
        super.setFocusableInTouchMode(focusable
                && mDesiredFocusableInTouchModeState);
        super.setFocusable(focusable && mDesiredFocusableState);
        if (mEmptyView != null) {
            updateEmptyStatus(adapter == null || adapter.isEmpty());
        } 
    } 
 
    void checkSelectionChanged() { 
        if (mSelectedPosition != mOldSelectedPosition
                || mSelectedRowId != mOldSelectedRowId) {
            selectionChanged(); 
            mOldSelectedPosition = mSelectedPosition;
            mOldSelectedRowId = mSelectedRowId;
        } 
    } 
 
    @Override 
    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
6
CodeRank
This code example shows how to use the following methods:isEmpty
		return wrapped.getViewTypeCount();
	} 
 
	@Override 
	public boolean isEmpty() { 
		return wrapped.isEmpty();
	} 
} 
6
CodeRank
This code example shows how to use the following methods:isEmpty
     */ 
    public void setEmptyView(View emptyView) {
        mEmptyView = emptyView;
 
        final T adapter = getAdapter();
        final boolean empty = ((adapter == null) || adapter.isEmpty());
        updateEmptyStatus(empty);
    } 
 
    /** 
     * When the current adapter is empty, the AdapterView can display a special view 
     * call the empty view. The empty view is used to provide feedback to the user 
     * that no data is available in this AdapterView. 
     * 
     * @return The view to show if the adapter is empty. 
     */ 
    public View getEmptyView() {
        return mEmptyView;
    } 
 
5
CodeRank
This code example shows how to use the following methods:isEmpty
            return wrapped.hasStableIds();
        } 
 
        @Override 
        public boolean isEmpty() { 
            return wrapped.isEmpty();
        } 
 
        private DataSetObserver lastDataSetObserver;
 
        public void notifyDataSetChanged() { 
            if (lastDataSetObserver != null) {
                lastDataSetObserver.onChanged();
            } 
        } 
 
        @Override 
        public void registerDataSetObserver(DataSetObserver dataSetObserver) {
            wrapped.registerDataSetObserver(lastDataSetObserver = dataSetObserver);
        } 
3
CodeRank
This code example shows how to use the following methods:isEmpty
//        } 
    } 
 
    @Override 
    public boolean isEmpty() { 
    	return mOrigAdapter == null || mOrigAdapter.isEmpty();
    } 
     
    /** 
     * 返回原始Adapter 
     *  
     * @return 
     */ 
    public ListAdapter getOrigAdapter() {
        return mOrigAdapter;
    } 
 
    /** 
     * 显示header View 
     *  
4
CodeRank
This code example shows how to use the following methods:isEmpty
            return mHeaderViewInfos.size();
        } 
 
        @Override 
        public boolean isEmpty() { 
            return (mAdapter == null || mAdapter.isEmpty()) && getHeadersCount() == 0;
        } 
 
        public void setNumColumns(int numColumns) {
            if (numColumns < 1) {
                throw new IllegalArgumentException("Number of columns must be 1 or more");
            } 
            if (mNumColumns != numColumns) {
                mNumColumns = numColumns;
                notifyDataSetChanged(); 
            } 
        } 
 
        private boolean areAllListInfosSelectable(ArrayList<FixedViewInfo> infos) {
            if (infos != null) {
3
CodeRank
This code example shows how to use the following methods:isEmpty
        return 1; 
    } 
 
    @Override 
    public boolean isEmpty() { 
        return mAdapter == null || mAdapter.isEmpty();
    } 
} 
4
CodeRank
This code example shows how to use the following methods:isEmpty
	public boolean hasStableIds() { 
		return this.contentAdapter.hasStableIds();
	} 
 
	public boolean isEmpty() { 
		return this.contentAdapter.isEmpty();
	} 
 
	public void registerDataSetObserver(DataSetObserver observer) {
		this.contentAdapter.registerDataSetObserver(observer);
	} 
 
	public void unregisterDataSetObserver(DataSetObserver observer) {
		this.contentAdapter.unregisterDataSetObserver(observer);
	} 
 
} 
4
CodeRank
This code example shows how to use the following methods:isEmpty
            ((FrameLayout)parent).removeView(transparentView);
        } 
        transparentView = ((SectionListAdapter)adapter).getTransparentSectionView();
        final FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
        ((FrameLayout)parent).addView(transparentView,lp);
        if (adapter.isEmpty())
        { 
            transparentView.setVisibility(View.INVISIBLE);
        } 
    } 
     
    @Override 
    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
            int totalItemCount)
    { 
        final SectionListAdapter adapter = (SectionListAdapter) getAdapter();
        if (adapter != null)
        { 
            adapter.makeSectionInvisibleIfFirstInList(firstVisibleItem);
            Log.i(TAG,"firstVisibleItem"+firstVisibleItem);
4
CodeRank

Related Adapter isEmpty Questions & Answers:

isEmpty Method Overview
See Code Examples for other Android Adapter Methods: