Class DynamicSpinnerImageAdapter

java.lang.Object
android.widget.BaseAdapter
android.widget.ArrayAdapter<DynamicMenu>
com.pranavpandey.android.dynamic.support.adapter.DynamicSpinnerImageAdapter
All Implemented Interfaces:
Adapter, Filterable, ListAdapter, SpinnerAdapter, ThemedSpinnerAdapter

public class DynamicSpinnerImageAdapter extends ArrayAdapter<DynamicMenu>
A simple array adapter for the Spinner which can display an icon and text together as an item. Use the constructor to pass the layout resource, image and the text id with a list of items according to the requirements.
  • Constructor Details

    • DynamicSpinnerImageAdapter

      public DynamicSpinnerImageAdapter(@NonNull Context context, int resource, int imageViewResourceId, int textViewResourceId, @NonNull List<DynamicMenu> data)
      Constructor to initialize an object of this class.
      Parameters:
      context - The context to be used.
      resource - The layout resource to be used.
      imageViewResourceId - The resource id for the image view.
      textViewResourceId - The resource id for the text view.
      data - The data to be handled by this adapter.
    • DynamicSpinnerImageAdapter

      public DynamicSpinnerImageAdapter(@NonNull Context context, int resource, int imageViewResourceId, int textViewResourceId, @NonNull List<DynamicMenu> data, @Nullable View parent)
      Constructor to initialize an object of this class.
      Parameters:
      context - The context to be used.
      resource - The layout resource to be used.
      imageViewResourceId - The resource id for the image view.
      textViewResourceId - The resource id for the text view.
      data - The data to be handled by this adapter.
      parent - The view handling this adapter.
  • Method Details