use of com.hannesdorfmann.adapterdelegates3.sample.model.Cat in project AdapterDelegates by sockeqwe.
the class MainActivity method getAnimals.
private List<DisplayableItem> getAnimals() {
List<DisplayableItem> animals = new ArrayList<>();
animals.add(new Cat("American Curl"));
animals.add(new Cat("Baliness"));
animals.add(new Cat("Bengal"));
animals.add(new Cat("Corat"));
animals.add(new Cat("Manx"));
animals.add(new Cat("Nebelung"));
animals.add(new Dog("Aidi"));
animals.add(new Dog("Chinook"));
animals.add(new Dog("Appenzeller"));
animals.add(new Dog("Collie"));
animals.add(new Snake("Mub Adder", "Adder"));
animals.add(new Snake("Texas Blind Snake", "Blind snake"));
animals.add(new Snake("Tree Boa", "Boa"));
animals.add(new Gecko("Fat-tailed", "Hemitheconyx"));
animals.add(new Gecko("Stenodactylus", "Dune Gecko"));
animals.add(new Gecko("Leopard Gecko", "Eublepharis"));
animals.add(new Gecko("Madagascar Gecko", "Phelsuma"));
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
Collections.shuffle(animals);
return animals;
}
use of com.hannesdorfmann.adapterdelegates3.sample.model.Cat in project AdapterDelegates by sockeqwe.
the class CatAdapterDelegate method onBindViewHolder.
@Override
public void onBindViewHolder(@NonNull List<DisplayableItem> items, int position, @NonNull RecyclerView.ViewHolder holder, @Nullable List<Object> payloads) {
CatViewHolder vh = (CatViewHolder) holder;
Cat cat = (Cat) items.get(position);
vh.name.setText(cat.getName());
Log.d("Scroll", "CatAdapterDelegate bind " + position);
}
use of com.hannesdorfmann.adapterdelegates3.sample.model.Cat in project AdapterDelegates by sockeqwe.
the class MainActivity method getAnimals.
private List<DisplayableItem> getAnimals() {
List<DisplayableItem> animals = new ArrayList<>();
animals.add(new Cat("American Curl"));
animals.add(new Cat("Baliness"));
animals.add(new Cat("Bengal"));
animals.add(new Cat("Corat"));
animals.add(new Cat("Manx"));
animals.add(new Cat("Nebelung"));
animals.add(new Dog("Aidi"));
animals.add(new Dog("Chinook"));
animals.add(new Dog("Appenzeller"));
animals.add(new Dog("Collie"));
animals.add(new Snake("Mub Adder", "Adder"));
animals.add(new Snake("Texas Blind Snake", "Blind snake"));
animals.add(new Snake("Tree Boa", "Boa"));
animals.add(new Gecko("Fat-tailed", "Hemitheconyx"));
animals.add(new Gecko("Stenodactylus", "Dune Gecko"));
animals.add(new Gecko("Leopard Gecko", "Eublepharis"));
animals.add(new Gecko("Madagascar Gecko", "Phelsuma"));
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
animals.add(new Advertisement());
Collections.shuffle(animals);
return animals;
}
use of com.hannesdorfmann.adapterdelegates3.sample.model.Cat in project AdapterDelegates by sockeqwe.
the class CatAdapterDelegate method onBindViewHolder.
@Override
public void onBindViewHolder(@NonNull List<DisplayableItem> items, int position, @NonNull RecyclerView.ViewHolder holder, @Nullable List<Object> payloads) {
CatViewHolder vh = (CatViewHolder) holder;
Cat cat = (Cat) items.get(position);
vh.name.setText(cat.getName());
Log.d("Scroll", "CatAdapterDelegate bind " + position);
}
Aggregations