belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1
RecyclerView.ViewCacheExtension
  public
  static
  
  abstract
  class
  RecyclerView.ViewCacheExtension
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.support.v7.widget.RecyclerView.ViewCacheExtension | 
ViewCacheExtension is a helper class to provide an additional layer of view caching that can be controlled by the developer.
 When getViewForPosition(int) is called, Recycler checks attached scrap and
 first level cache to find a matching View. If it cannot find a suitable View, Recycler will
 call the getViewForPositionAndType(Recycler, int, int) before checking
 RecyclerView.RecycledViewPool.
 
Note that, Recycler never sends Views to this method to be cached. It is developers responsibility to decide whether they want to keep their Views in this custom cache or let the default recycling policy handle it.
Summary
| Public constructors | |
|---|---|
| 
      RecyclerView.ViewCacheExtension()
       | |
| Public methods | |
|---|---|
| 
        abstract
        
        
        
        
        View | 
      getViewForPositionAndType(RecyclerView.Recycler recycler, int position, int type)
      Returns a View that can be binded to the given Adapter position. | 
| Inherited methods | |
|---|---|
|  From
class 
  
    java.lang.Object
  
 | |
Public constructors
Public methods
getViewForPositionAndType
View getViewForPositionAndType (RecyclerView.Recycler recycler, int position, int type)
Returns a View that can be binded to the given Adapter position.
 This method should not create a new View. Instead, it is expected to return
 an already created View that can be re-used for the given type and position.
 If the View is marked as ignored, it should first call
 stopIgnoringView(View) before returning the View.
 
RecyclerView will re-bind the returned View to the position if necessary.
| Parameters | |
|---|---|
| recycler | RecyclerView.Recycler: The Recycler that can be used to bind the View | 
| position | int: The adapter position | 
| type | int: The type of the View, defined by adapter | 
| Returns | |
|---|---|
| View | A View that is bound to the given position or NULL if there is no View to re-use | 
See also:
- Annotations
- Interfaces- ActionMenuView.OnMenuItemClickListener
- PopupMenu.OnDismissListener
- PopupMenu.OnMenuItemClickListener
- RecyclerView.ChildDrawingOrderCallback
- RecyclerView.ItemAnimator.ItemAnimatorFinishedListener
- RecyclerView.LayoutManager.LayoutPrefetchRegistry
- RecyclerView.OnChildAttachStateChangeListener
- RecyclerView.OnItemTouchListener
- RecyclerView.RecyclerListener
- RecyclerView.SmoothScroller.ScrollVectorProvider
- SearchView.OnCloseListener
- SearchView.OnQueryTextListener
- SearchView.OnSuggestionListener
- ShareActionProvider.OnShareTargetSelectedListener
- ThemedSpinnerAdapter
- Toolbar.OnMenuItemClickListener
 
- Classes- ActionMenuView
- ActionMenuView.LayoutParams
- AppCompatAutoCompleteTextView
- AppCompatButton
- AppCompatCheckBox
- AppCompatCheckedTextView
- AppCompatEditText
- AppCompatImageButton
- AppCompatImageView
- AppCompatMultiAutoCompleteTextView
- AppCompatRadioButton
- AppCompatRatingBar
- AppCompatSeekBar
- AppCompatSpinner
- AppCompatTextView
- CardView
- DefaultItemAnimator
- DividerItemDecoration
- GridLayout
- GridLayout.Alignment
- GridLayout.LayoutParams
- GridLayout.Spec
- GridLayoutManager
- GridLayoutManager.DefaultSpanSizeLookup
- GridLayoutManager.LayoutParams
- GridLayoutManager.SpanSizeLookup
- LinearLayoutCompat
- LinearLayoutCompat.LayoutParams
- LinearLayoutManager
- LinearLayoutManager.LayoutChunkResult
- LinearSmoothScroller
- LinearSnapHelper
- ListPopupWindow
- OrientationHelper
- PagerSnapHelper
- PopupMenu
- RecyclerView
- RecyclerView.Adapter
- RecyclerView.AdapterDataObserver
- RecyclerView.EdgeEffectFactory
- RecyclerView.ItemAnimator
- RecyclerView.ItemAnimator.ItemHolderInfo
- RecyclerView.ItemDecoration
- RecyclerView.LayoutManager
- RecyclerView.LayoutManager.Properties
- RecyclerView.LayoutParams
- RecyclerView.OnFlingListener
- RecyclerView.OnScrollListener
- RecyclerView.RecycledViewPool
- RecyclerView.Recycler
- RecyclerView.SimpleOnItemTouchListener
- RecyclerView.SmoothScroller
- RecyclerView.SmoothScroller.Action
- RecyclerView.State
- RecyclerView.ViewCacheExtension
- RecyclerView.ViewHolder
- RecyclerViewAccessibilityDelegate
- RecyclerViewAccessibilityDelegate.ItemDelegate
- SearchView
- ShareActionProvider
- SimpleItemAnimator
- SnapHelper
- StaggeredGridLayoutManager
- StaggeredGridLayoutManager.LayoutParams
- SwitchCompat
- ThemedSpinnerAdapter.Helper
- Toolbar
- Toolbar.LayoutParams
- Toolbar.SavedState
- TooltipCompat
 
