Tabnine Logo
LongSparseArray.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
androidx.collection.LongSparseArray
constructor

Best Java code snippets using androidx.collection.LongSparseArray.<init> (Showing top 9 results out of 315)

origin: airbnb/epoxy

DiffPayload(List<? extends EpoxyModel<?>> models) {
 if (models.isEmpty()) {
  throw new IllegalStateException("Models must not be empty");
 }
 int modelCount = models.size();
 if (modelCount == 1) {
  // Optimize for the common case of only one model changed.
  singleModel = models.get(0);
  modelsById = null;
 } else {
  singleModel = null;
  modelsById = new LongSparseArray<>(modelCount);
  for (EpoxyModel<?> model : models) {
   modelsById.put(model.id(), model);
  }
 }
}
origin: airbnb/lottie-android

private LottieComposition createComposition(int startFrame, int endFrame) {
 LottieComposition composition = new LottieComposition();
 composition.init(new Rect(), startFrame, endFrame, 1000, new ArrayList<Layer>(),
     new LongSparseArray<Layer>(0), new HashMap<String, List<Layer>>(0),
     new HashMap<String, LottieImageAsset>(0), new SparseArrayCompat<FontCharacter>(0),
     new HashMap<String, Font>(0));
 return composition;
}
origin: airbnb/lottie-android

@SuppressWarnings("SameParameterValue")
private LottieComposition createComposition(int startFrame, int endFrame) {
 LottieComposition composition = new LottieComposition();
 composition.init(new Rect(), startFrame, endFrame, 1000, new ArrayList<Layer>(),
     new LongSparseArray<Layer>(0), new HashMap<String, List<Layer>>(0),
     new HashMap<String, LottieImageAsset>(0), new SparseArrayCompat<FontCharacter>(0),
     new HashMap<String, Font>(0));
 return composition;
}
origin: airbnb/lottie-android

float endFrame = 0f;
float frameRate = 0f;
final LongSparseArray<Layer> layerMap = new LongSparseArray<>();
final List<Layer> layers = new ArrayList<>();
int width = 0;
origin: airbnb/lottie-android

new LongSparseArray<>(composition.getLayers().size());
origin: airbnb/lottie-android

LongSparseArray<Layer> layerMap = new LongSparseArray<>();
origin: cbeyls/fosdem-companion-android

SavedState(Parcel in) {
  checkedItemCount = in.readInt();
  checkStates = in.readSparseBooleanArray();
  final int n = in.readInt();
  if (n >= 0) {
    checkedIdStates = new LongSparseArray<>(n);
    for (int i = 0; i < n; i++) {
      final long key = in.readLong();
      final int value = in.readInt();
      checkedIdStates.append(key, value);
    }
  }
}
origin: KDE/kdeconnect-android

@Deprecated
protected static Map<Long, VCardBuilder> getVCardsFast(Context context, Collection<Long> IDs, Map<Long, String> lookupKeys) {
  LongSparseArray<VCardBuilder> toReturn = new LongSparseArray<>();
  StringBuilder keys = new StringBuilder();
origin: cbeyls/fosdem-companion-android

/**
 * Make sure this constructor is called before setting the adapter on the RecyclerView
 * so this class will be notified before the RecyclerView in case of data set changes.
 */
public MultiChoiceHelper(@NonNull AppCompatActivity activity, @NonNull RecyclerView.Adapter adapter) {
  this.activity = activity;
  this.adapter = adapter;
  adapter.registerAdapterDataObserver(new AdapterDataSetObserver());
  checkStates = new SparseBooleanArray(0);
  if (adapter.hasStableIds()) {
    checkedIdStates = new LongSparseArray<>(0);
  }
}
androidx.collectionLongSparseArray<init>

Popular methods of LongSparseArray

  • put
  • get
  • size
  • keyAt
  • valueAt
  • delete
  • remove
  • append
  • clear
  • clone
  • setValueAt
  • setValueAt

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reference (javax.naming)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now