Home | History | Annotate | Download | only in api
      1 package androidx.recyclerview.selection {
      2 
      3   public abstract class BandPredicate {
      4     ctor public BandPredicate();
      5     method public abstract boolean canInitiate(android.view.MotionEvent);
      6   }
      7 
      8   public static final class BandPredicate.EmptyArea extends androidx.recyclerview.selection.BandPredicate {
      9     ctor public BandPredicate.EmptyArea(androidx.recyclerview.widget.RecyclerView);
     10     method public boolean canInitiate(android.view.MotionEvent);
     11   }
     12 
     13   public static final class BandPredicate.NonDraggableArea extends androidx.recyclerview.selection.BandPredicate {
     14     ctor public BandPredicate.NonDraggableArea(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.selection.ItemDetailsLookup);
     15     method public boolean canInitiate(android.view.MotionEvent);
     16   }
     17 
     18   public abstract class FocusDelegate<K> {
     19     ctor public FocusDelegate();
     20     method public abstract void clearFocus();
     21     method public abstract void focusItem(androidx.recyclerview.selection.ItemDetailsLookup.ItemDetails<K>);
     22     method public abstract int getFocusedPosition();
     23     method public abstract boolean hasFocusedItem();
     24   }
     25 
     26   public abstract class ItemDetailsLookup<K> {
     27     ctor public ItemDetailsLookup();
     28     method public abstract androidx.recyclerview.selection.ItemDetailsLookup.ItemDetails<K> getItemDetails(android.view.MotionEvent);
     29   }
     30 
     31   public static abstract class ItemDetailsLookup.ItemDetails<K> {
     32     ctor public ItemDetailsLookup.ItemDetails();
     33     method public abstract int getPosition();
     34     method public abstract K getSelectionKey();
     35     method public boolean hasSelectionKey();
     36     method public boolean inDragRegion(android.view.MotionEvent);
     37     method public boolean inSelectionHotspot(android.view.MotionEvent);
     38   }
     39 
     40   public abstract class ItemKeyProvider<K> {
     41     ctor protected ItemKeyProvider(int);
     42     method public abstract K getKey(int);
     43     method public abstract int getPosition(K);
     44     field public static final int SCOPE_CACHED = 1; // 0x1
     45     field public static final int SCOPE_MAPPED = 0; // 0x0
     46   }
     47 
     48   public static abstract class ItemKeyProvider.Scope implements java.lang.annotation.Annotation {
     49   }
     50 
     51   public final class MutableSelection<K> extends androidx.recyclerview.selection.Selection {
     52     ctor public MutableSelection();
     53     method public boolean add(K);
     54     method public void clear();
     55     method public void copyFrom(androidx.recyclerview.selection.Selection<K>);
     56     method public boolean remove(K);
     57   }
     58 
     59   public abstract interface OnContextClickListener {
     60     method public abstract boolean onContextClick(android.view.MotionEvent);
     61   }
     62 
     63   public abstract interface OnDragInitiatedListener {
     64     method public abstract boolean onDragInitiated(android.view.MotionEvent);
     65   }
     66 
     67   public abstract interface OnItemActivatedListener<K> {
     68     method public abstract boolean onItemActivated(androidx.recyclerview.selection.ItemDetailsLookup.ItemDetails<K>, android.view.MotionEvent);
     69   }
     70 
     71   public final class OperationMonitor {
     72     ctor public OperationMonitor();
     73     method public void addListener(androidx.recyclerview.selection.OperationMonitor.OnChangeListener);
     74     method public synchronized boolean isStarted();
     75     method public void removeListener(androidx.recyclerview.selection.OperationMonitor.OnChangeListener);
     76   }
     77 
     78   public static abstract interface OperationMonitor.OnChangeListener {
     79     method public abstract void onChanged();
     80   }
     81 
     82   public class Selection<K> implements java.lang.Iterable {
     83     method public boolean contains(K);
     84     method public boolean isEmpty();
     85     method public java.util.Iterator<K> iterator();
     86     method public int size();
     87   }
     88 
     89   public final class SelectionPredicates {
     90     method public static <K> androidx.recyclerview.selection.SelectionTracker.SelectionPredicate<K> createSelectAnything();
     91     method public static <K> androidx.recyclerview.selection.SelectionTracker.SelectionPredicate<K> createSelectSingleAnything();
     92   }
     93 
     94   public abstract class SelectionTracker<K> {
     95     ctor public SelectionTracker();
     96     method public abstract void addObserver(androidx.recyclerview.selection.SelectionTracker.SelectionObserver);
     97     method public abstract boolean clearSelection();
     98     method public abstract void copySelection(androidx.recyclerview.selection.MutableSelection<K>);
     99     method public abstract boolean deselect(K);
    100     method public abstract androidx.recyclerview.selection.Selection<K> getSelection();
    101     method public abstract boolean hasSelection();
    102     method public abstract boolean isSelected(K);
    103     method public abstract void onRestoreInstanceState(android.os.Bundle);
    104     method public abstract void onSaveInstanceState(android.os.Bundle);
    105     method protected abstract void restoreSelection(androidx.recyclerview.selection.Selection<K>);
    106     method public abstract boolean select(K);
    107     method public abstract boolean setItemsSelected(java.lang.Iterable<K>, boolean);
    108     field public static final java.lang.String SELECTION_CHANGED_MARKER = "Selection-Changed";
    109   }
    110 
    111   public static final class SelectionTracker.Builder<K> {
    112     ctor public SelectionTracker.Builder(java.lang.String, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.selection.ItemKeyProvider<K>, androidx.recyclerview.selection.ItemDetailsLookup<K>, androidx.recyclerview.selection.StorageStrategy<K>);
    113     method public androidx.recyclerview.selection.SelectionTracker<K> build();
    114     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withBandOverlay(int);
    115     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withBandPredicate(androidx.recyclerview.selection.BandPredicate);
    116     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withFocusDelegate(androidx.recyclerview.selection.FocusDelegate<K>);
    117     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withGestureTooltypes(int...);
    118     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withOnContextClickListener(androidx.recyclerview.selection.OnContextClickListener);
    119     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withOnDragInitiatedListener(androidx.recyclerview.selection.OnDragInitiatedListener);
    120     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withOnItemActivatedListener(androidx.recyclerview.selection.OnItemActivatedListener<K>);
    121     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withOperationMonitor(androidx.recyclerview.selection.OperationMonitor);
    122     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withPointerTooltypes(int...);
    123     method public androidx.recyclerview.selection.SelectionTracker.Builder<K> withSelectionPredicate(androidx.recyclerview.selection.SelectionTracker.SelectionPredicate<K>);
    124   }
    125 
    126   public static abstract class SelectionTracker.SelectionObserver<K> {
    127     ctor public SelectionTracker.SelectionObserver();
    128     method public void onItemStateChanged(K, boolean);
    129     method public void onSelectionChanged();
    130     method public void onSelectionRefresh();
    131     method public void onSelectionRestored();
    132   }
    133 
    134   public static abstract class SelectionTracker.SelectionPredicate<K> {
    135     ctor public SelectionTracker.SelectionPredicate();
    136     method public abstract boolean canSelectMultiple();
    137     method public abstract boolean canSetStateAtPosition(int, boolean);
    138     method public abstract boolean canSetStateForKey(K, boolean);
    139   }
    140 
    141   public final class StableIdKeyProvider extends androidx.recyclerview.selection.ItemKeyProvider {
    142     ctor public StableIdKeyProvider(androidx.recyclerview.widget.RecyclerView);
    143     method public java.lang.Long getKey(int);
    144     method public int getPosition(java.lang.Long);
    145   }
    146 
    147   public abstract class StorageStrategy<K> {
    148     ctor public StorageStrategy(java.lang.Class<K>);
    149     method public abstract android.os.Bundle asBundle(androidx.recyclerview.selection.Selection<K>);
    150     method public abstract androidx.recyclerview.selection.Selection<K> asSelection(android.os.Bundle);
    151     method public static androidx.recyclerview.selection.StorageStrategy<java.lang.Long> createLongStorage();
    152     method public static <K extends android.os.Parcelable> androidx.recyclerview.selection.StorageStrategy<K> createParcelableStorage(java.lang.Class<K>);
    153     method public static androidx.recyclerview.selection.StorageStrategy<java.lang.String> createStringStorage();
    154   }
    155 
    156 }
    157 
    158