Beispiel #1
0
 /**
  * overwrite the unregisterAdapterDataObserver to correctly forward all events to the FastAdapter
  *
  * @param observer
  */
 @Override
 public void unregisterAdapterDataObserver(RecyclerView.AdapterDataObserver observer) {
   super.unregisterAdapterDataObserver(observer);
   if (mFastAdapter != null) {
     mFastAdapter.unregisterAdapterDataObserver(observer);
   }
 }
Beispiel #2
0
 /**
  * overwrite the getItemId to correctly return the value from the FastAdapter
  *
  * @param position
  * @return
  */
 @Override
 public long getItemId(int position) {
   return mFastAdapter.getItemId(position);
 }
Beispiel #3
0
 /**
  * overwrite the getItemViewType to correctly return the value from the FastAdapter
  *
  * @param position
  * @return
  */
 @Override
 public int getItemViewType(int position) {
   return mFastAdapter.getItemViewType(position);
 }
Beispiel #4
0
 /**
  * internal mapper to remember and add possible types for the RecyclerView
  *
  * @param item
  */
 public void mapPossibleType(Item item) {
   mFastAdapter.registerTypeInstance(item);
 }
Beispiel #5
0
 /**
  * the onAttachedToRecyclerView is managed by the FastAdapter so forward this correctly
  *
  * @param recyclerView
  */
 @Override
 public void onAttachedToRecyclerView(RecyclerView recyclerView) {
   mFastAdapter.onAttachedToRecyclerView(recyclerView);
 }
Beispiel #6
0
 /**
  * the onDetachedFromRecyclerView is managed by the FastAdapter so forward this correctly
  *
  * @param recyclerView
  */
 @Override
 public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
   mFastAdapter.onDetachedFromRecyclerView(recyclerView);
 }
Beispiel #7
0
 /**
  * the onFailedToRecycleView is managed by the FastAdapter so forward this correctly
  *
  * @param holder
  * @return
  */
 @Override
 public boolean onFailedToRecycleView(RecyclerView.ViewHolder holder) {
   return mFastAdapter.onFailedToRecycleView(holder);
 }
Beispiel #8
0
 /**
  * the onViewAttachedToWindow is managed by the FastAdapter so forward this correctly
  *
  * @param holder
  */
 @Override
 public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
   mFastAdapter.onViewAttachedToWindow(holder);
 }
Beispiel #9
0
 /**
  * the setHasStableIds is managed by the FastAdapter so forward this correctly
  *
  * @param hasStableIds
  */
 @Override
 public void setHasStableIds(boolean hasStableIds) {
   mFastAdapter.setHasStableIds(hasStableIds);
 }
Beispiel #10
0
 /**
  * the onViewRecycled is managed by the FastAdapter so forward this correctly
  *
  * @param holder
  */
 @Override
 public void onViewRecycled(RecyclerView.ViewHolder holder) {
   mFastAdapter.onViewRecycled(holder);
 }
Beispiel #11
0
 /**
  * the onBindViewHolder is managed by the FastAdapter so forward this correctly
  *
  * @param holder
  * @param position
  * @param payloads
  */
 @Override
 public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads) {
   mFastAdapter.onBindViewHolder(holder, position, payloads);
 }
Beispiel #12
0
 /**
  * the onBindViewHolder is managed by the FastAdapter so forward this correctly
  *
  * @param holder
  * @param position
  */
 @Override
 public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
   mFastAdapter.onBindViewHolder(holder, position);
 }
Beispiel #13
0
 /**
  * the onCreateViewHolder is managed by the FastAdapter so forward this correctly
  *
  * @param parent
  * @param viewType
  * @return
  */
 @Override
 public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
   return mFastAdapter.onCreateViewHolder(parent, viewType);
 }
Beispiel #14
0
 /**
  * make sure we return the count from the FastAdapter so we retrieve the count from all adapters
  *
  * @return
  */
 @Override
 public int getItemCount() {
   return mFastAdapter.getItemCount();
 }
Beispiel #15
0
 /**
  * make sure we return the Item from the FastAdapter so we retrieve the item from all adapters
  *
  * @param position
  * @return
  */
 @Override
 public Item getItem(int position) {
   return mFastAdapter.getItem(position);
 }