Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter
Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present. https://code.google.com/p/android/issues/detail?id=18316 Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246 Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
This commit is contained in:
@@ -79,7 +79,8 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return mAdapter == null || mAdapter.isEmpty();
|
||||
return (mAdapter == null || mAdapter.isEmpty())
|
||||
&& getFootersCount() + getHeadersCount() == 0;
|
||||
}
|
||||
|
||||
private boolean areAllListInfosSelectable(ArrayList<ListView.FixedViewInfo> infos) {
|
||||
|
||||
Reference in New Issue
Block a user