Skip to content

Commit

Permalink
fix #27, setEmptyView don't work when use addFooterView, thanks @Pank…
Browse files Browse the repository at this point in the history
  • Loading branch information
liaohuqiu committed May 16, 2015
1 parent daf9e10 commit c1e7ff1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/in/srain/cube/views/GridViewWithHeaderAndFooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,15 @@ public int getFootersCount() {
return mFooterViewInfos.size();
}

/**
* @return true if this adapter doesn't contain any data. This is used to determine
* whether the empty view should be displayed. A typical implementation will return
* getCount() == 0 but since getCount() includes the headers and footers, specialized
* adapters might want a different behavior.
*/
@Override
public boolean isEmpty() {
return (mAdapter == null || mAdapter.isEmpty()) && getHeadersCount() == 0 && getFootersCount() == 0;
return (mAdapter == null || mAdapter.isEmpty());
}

private boolean areAllListInfosSelectable(ArrayList<FixedViewInfo> infos) {
Expand Down

0 comments on commit c1e7ff1

Please sign in to comment.