private View configureHeader(WrapperView paramWrapperView, final int paramInt) { View localView; if (mHeader == null) { if (mHeaderCache.size() > 0) { localView = (View)mHeaderCache.remove(0); } } for (;;) { paramWrapperView = mDelegate.getHeaderView(paramInt, localView, paramWrapperView); if (paramWrapperView != null) { break; } throw new NullPointerException("Header view must not be null."); localView = null; continue; localView = mHeader; } paramWrapperView.setClickable(true); paramWrapperView.setOnClickListener(new View.OnClickListener() { public final void onClick(View paramAnonymousView) { if (mOnHeaderClickListener != null) { mDelegate.getHeaderId(paramInt); } } }); return paramWrapperView; }
@Override public View getView(int i, View view, ViewGroup viewGroup) { View convertView = mInnerAdapter.getView(i, view, viewGroup); mViewToItemIdMap.put(convertView, getItemId(i)); mHeaderIdToViewMap.add((int) getHeaderId(i), convertView); if (mCollapseHeaderIds.contains(getHeaderId(i))) { convertView.setVisibility(View.GONE); } else { convertView.setVisibility(View.VISIBLE); } return convertView; }
public boolean areAllItemsEnabled() { return mDelegate.areAllItemsEnabled(); }
@Override public boolean hasStableIds() { return mInnerAdapter.hasStableIds(); }
@Override public Object getItem(int i) { return mInnerAdapter.getItem(i); }
@Override public void unregisterDataSetObserver(DataSetObserver dataSetObserver) { mInnerAdapter.unregisterDataSetObserver(dataSetObserver); }
@Override public boolean areAllItemsEnabled() { return mInnerAdapter.areAllItemsEnabled(); }
@Override public View getHeaderView(int position, View convertView, ViewGroup parent) { return mInnerAdapter.getHeaderView(position, convertView, parent); }
@Override public int getItemViewType(int i) { return mInnerAdapter.getItemViewType(i); }
public int getItemViewType(int paramInt) { return mDelegate.getItemViewType(paramInt); }
public long getItemId(int paramInt) { return mDelegate.getItemId(paramInt); }
public Object getItem(int paramInt) { return mDelegate.getItem(paramInt); }
public final View getHeaderView(int paramInt, View paramView, ViewGroup paramViewGroup) { return mDelegate.getHeaderView(paramInt, paramView, paramViewGroup); }
public final long getHeaderId(int paramInt) { return mDelegate.getHeaderId(paramInt); }
public int getCount() { return mDelegate.getCount(); }
public boolean equals(Object paramObject) { return mDelegate.equals(paramObject); }
private WrapperView getView$1ad34c65(int paramInt, View paramView) { Object localObject = null; View localView2; int i; label68: View localView1; if (paramView == null) { paramView = new WrapperView(mContext); localView2 = mDelegate.getView(paramInt, mItem, paramView); if ((paramInt == 0) || (mDelegate.getHeaderId(paramInt) != mDelegate.getHeaderId(paramInt - 1))) { break label159; } i = 1; if (i == 0) { break label164; } localObject = mHeader; if (localObject != null) { mHeaderCache.add(localObject); } localView1 = null; label98: if ((!(localView2 instanceof Checkable)) || ((paramView instanceof CheckableWrapperView))) { break label260; } localObject = new CheckableWrapperView(mContext); } for (;;) { paramView = mDivider; paramInt = mDividerHeight; if (localView2 != null) { break label297; } throw new NullPointerException("List view item must not be null."); paramView = (WrapperView)paramView; break; label159: i = 0; break label68; label164: if (mHeader == null) { if (mHeaderCache.size() <= 0) {} } for (localObject = (View)mHeaderCache.remove(0);; localObject = mHeader) { localView1 = mDelegate.getHeaderView(paramInt, (View)localObject, paramView); if (localView1 != null) { break; } throw new NullPointerException("Header view must not be null."); } localView1.setClickable(true); localView1.setOnClickListener(new View.OnClickListener() { public final void onClick(View paramAnonymousView) { if (mOnHeaderClickListener != null) { mDelegate.getHeaderId(paramInt); } } }); break label98; label260: localObject = paramView; if (!(localView2 instanceof Checkable)) { localObject = paramView; if ((paramView instanceof CheckableWrapperView)) { localObject = new WrapperView(mContext); } } } label297: if (mItem != localView2) { ((WrapperView)localObject).removeView(mItem); mItem = localView2; ViewParent localViewParent = localView2.getParent(); if ((localViewParent != null) && (localViewParent != localObject) && ((localViewParent instanceof ViewGroup))) { ((ViewGroup)localViewParent).removeView(localView2); } ((WrapperView)localObject).addView(localView2); } if (mHeader != localView1) { if (mHeader != null) { ((WrapperView)localObject).removeView(mHeader); } mHeader = localView1; if (localView1 != null) { ((WrapperView)localObject).addView(localView1); } } if (mDivider != paramView) { mDivider = paramView; mDividerHeight = paramInt; ((WrapperView)localObject).invalidate(); } return (WrapperView)localObject; }
public int getViewTypeCount() { return mDelegate.getViewTypeCount(); }
@Override public boolean isEmpty() { return mInnerAdapter.isEmpty(); }
public boolean hasStableIds() { return mDelegate.hasStableIds(); }
@Override public long getHeaderId(int position) { return mInnerAdapter.getHeaderId(position); }
public int hashCode() { return mDelegate.hashCode(); }
@Override public boolean isEnabled(int i) { return mInnerAdapter.isEnabled(i); }
public boolean isEmpty() { return mDelegate.isEmpty(); }
@Override public int getCount() { return mInnerAdapter.getCount(); }
public boolean isEnabled(int paramInt) { return mDelegate.isEnabled(paramInt); }
@Override public long getItemId(int i) { return mInnerAdapter.getItemId(i); }
public String toString() { return mDelegate.toString(); }
AdapterWrapper(Context paramContext, StickyListHeadersAdapter paramStickyListHeadersAdapter) { mContext = paramContext; mDelegate = paramStickyListHeadersAdapter; paramStickyListHeadersAdapter.registerDataSetObserver(mDataSetObserver); }
private boolean previousPositionHasSameHeader(int paramInt) { return (paramInt != 0) && (mDelegate.getHeaderId(paramInt) == mDelegate.getHeaderId(paramInt - 1)); }