Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SimpleLoadingAdapterStrategy.java « impl « gallery « maps « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16511f131164bff0e495dd8e888b6f4ccd9e4333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.mapswithme.maps.gallery.impl;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mapswithme.maps.R;
import com.mapswithme.maps.gallery.Holders;
import com.mapswithme.maps.gallery.ItemSelectedListener;
import com.mapswithme.maps.gallery.Items;
import com.mapswithme.maps.gallery.SimpleSingleItemAdapterStrategy;

public class SimpleLoadingAdapterStrategy
    extends SimpleSingleItemAdapterStrategy<Holders.SimpleViewHolder>
{
  SimpleLoadingAdapterStrategy(@Nullable ItemSelectedListener<Items.Item> listener)
  {
    this(listener, null);
  }

  public SimpleLoadingAdapterStrategy(@Nullable ItemSelectedListener<Items.Item> listener,
                                      @Nullable String url)
  {
    super(listener, url);
  }

  @Override
  protected int getTitle()
  {
    return R.string.discovery_button_other_loading_message;
  }

  @NonNull
  @Override
  protected View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent)
  {
    return inflater.inflate(R.layout.item_discovery_simple_loading, parent, false);
  }

  @Override
  protected Holders.SimpleViewHolder createViewHolder(@NonNull View itemView)
  {
    return new Holders.SimpleViewHolder(itemView, mItems, getListener());
  }
}