com.example.labstatus

## Class SoftListAdapter

- java.lang.Object
- - androidx.recyclerview.widget.RecyclerView.Adapter<SoftListAdapter.MyViewHolder>
  - - com.example.labstatus.SoftListAdapter

    public class SoftListAdapter
    extends androidx.recyclerview.widget.RecyclerView.Adapter<SoftListAdapter.MyViewHolder>

Author:
  Area51

### Nested Class Summary

Nested Classes
`static class` `SoftListAdapter.MyViewHolder` Each data item is just a string in this case

### Field Summary

Fields
`private java.util.ArrayList<java.lang.String>` `mDataset`

### Constructor Summary

Constructors
Constructor and Description
`SoftListAdapter(java.util.ArrayList<java.lang.String> myDataset)` Provide a suitable constructor (depends on the kind of dataset)

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `filterList(java.util.ArrayList<java.lang.String> filterdNames)` Provide a reference to the views for each data item Complex data items may need more than one view per item, and you provide access to all the views for a data item in a view holder
`int` `getItemCount()` Return the size of your dataset (invoked by the layout manager) and assigning it to the list with notifydatasetchanged method
`void` `onBindViewHolder(SoftListAdapter.MyViewHolder holder, int position)` Replace the contents of a view (invoked by the layout manager)
`SoftListAdapter.MyViewHolder` `onCreateViewHolder(android.view.ViewGroup parent, int viewType)` Create new views (invoked by the layout manager)

### Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

`bindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### mDataset

    private java.util.ArrayList<java.lang.String> mDataset

### Constructor Detail

#### SoftListAdapter

    public SoftListAdapter(java.util.ArrayList<java.lang.String> myDataset)

Provide a suitable constructor (depends on the kind of dataset)

Parameters:
  `myDataset` - ArrayList Data Set

### Method Detail

#### filterList

    public void filterList(java.util.ArrayList<java.lang.String> filterdNames)

Provide a reference to the views for each data item Complex data items may need more than one view per item, and you provide access to all the views for a data item in a view holder

Parameters:
  `filterdNames` - filetered list

#### getItemCount

    public int getItemCount()

Return the size of your dataset (invoked by the layout manager) and assigning it to the list with notifydatasetchanged method

Specified by:
  `getItemCount` in class `androidx.recyclerview.widget.RecyclerView.Adapter<SoftListAdapter.MyViewHolder>`
Returns:
  size of dataset

#### onBindViewHolder

    public void onBindViewHolder(SoftListAdapter.MyViewHolder holder,
                                 int position)

Replace the contents of a view (invoked by the layout manager)

Specified by:
  `onBindViewHolder` in class `androidx.recyclerview.widget.RecyclerView.Adapter<SoftListAdapter.MyViewHolder>`
Parameters:
  `holder` - replace the contents of the view with that element
  `position` - get element from your dataset at this position

#### onCreateViewHolder

    public SoftListAdapter.MyViewHolder onCreateViewHolder(android.view.ViewGroup parent,
                                                           int viewType)

Create new views (invoked by the layout manager)

Specified by:
  `onCreateViewHolder` in class `androidx.recyclerview.widget.RecyclerView.Adapter<SoftListAdapter.MyViewHolder>`