StorageStrategy
public
abstract
class
StorageStrategy
extends Object
java.lang.Object
|
↳ |
androidx.recyclerview.selection.StorageStrategy<K>
|
Strategy for storing keys in saved state. Extend this class when using custom
key types that aren't supported by default. Prefer use of builtin storage strategies:
createStringStorage()
, createLongStorage()
,
createParcelableStorage(Class)
.
See
SelectionTracker.Builder
for more detailed advice on which key type to use for your selection keys.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
StorageStrategy
public StorageStrategy (Class<K> type)
Creates a new instance.
Parameters |
type |
Class : the key type class that is being used.
|
Public methods
asBundle
public abstract Bundle asBundle (Selection<K> selection)
Creates a Bundle
from supplied Selection
.
Parameters |
selection |
Selection : The selection to asBundle.
|
asSelection
public abstract Selection<K> asSelection (Bundle state)
Create a Selection
from supplied Bundle
.
Parameters |
state |
Bundle : Bundle instance that may contain parceled Selection instance.
|
createParcelableStorage
public static StorageStrategy<K> createParcelableStorage (Class<K> type)
createStringStorage
public static StorageStrategy<String> createStringStorage ()