/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
android/src/com/mapswithme/maps/gallery/impl/GuidesAdapterStrategy.java
42 строки
1 KB
Александр Зацепин
[android] Implemented guides gallery adapter, only default state with stubs
27 апр 2020, 21:40
27 апр 2020, 21:40
b811e94
Код
Авторство
О чём код?
package com.mapswithme.maps.gallery.impl; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.mapswithme.maps.R; import com.mapswithme.maps.gallery.Holders; import com.mapswithme.maps.gallery.ItemSelectedListener; import com.mapswithme.maps.gallery.RegularAdapterStrategy; import com.mapswithme.maps.guides.GuidesGallery; import java.util.List; public class GuidesAdapterStrategy extends RegularAdapterStrategy<GuidesGallery.Item> { GuidesAdapterStrategy(@NonNull List<GuidesGallery.Item> items, @Nullable ItemSelectedListener<GuidesGallery.Item> listener) { super(items, null, listener, Integer.MAX_VALUE); } @NonNull @Override protected Holders.BaseViewHolder<GuidesGallery.Item> createProductViewHolder( @NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()) .inflate(R.layout.guides_discovery_item, parent, false); return new Holders.GuideHodler(view, mItems, getListener()); } @NonNull @Override protected Holders.BaseViewHolder<GuidesGallery.Item> createMoreProductsViewHolder( @NonNull ViewGroup parent, int viewType) { throw new UnsupportedOperationException("Guides adapter doesn't support more item!"); } }