kr.co.hanwha.hifive.adapter

## Class AlarmListAdapter

- java.lang.Object
- - android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>
  - - kr.co.hanwha.hifive.adapter.AlarmListAdapter

All Implemented Interfaces:
  AlarmListContract.Model, AlarmListContract.View

    public class AlarmListAdapter
    extends android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>
    implements AlarmListContract.Model, AlarmListContract.View

알림 목록 어댑터

See Also:
  `AlarmActivity`, `Created by sanghoonkwon on 2018. 1. 22..`

### Field Summary

Fields
`private int` `COUNT_EMPTY`
`private int` `COUNT_FOOTER_LOADING`
`private boolean` `isVisibleFooter`
`private android.content.Context` `mContext`
`private java.util.ArrayList<AlarmData>` `mListData`
`private AlarmListContract.OnAlarmListListener` `mOnAlarmListListener`
`private int` `TYPE_ALARM`
`private int` `TYPE_EMPTY`
`private int` `TYPE_FOOTER_LOADING`
`private int` `ZERO`

### Constructor Summary

Constructors
Constructor and Description
`AlarmListAdapter(android.content.Context context, AlarmListContract.OnAlarmListListener onAlarmListListener)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addItems(java.util.ArrayList<AlarmData> list)` Model
`int` `getItemCount()`
`int` `getItemViewType(int position)` View
`private boolean` `isEmpty()`
`private boolean` `isFooter(int position)`
`void` `notifyDataAll()`
`void` `notifyDataRangeChanged(int positionStart, int itemCount)`
`void` `onBindViewHolder(android.support.v7.widget.RecyclerView.ViewHolder holder, int position)`
`android.support.v7.widget.RecyclerView.ViewHolder` `onCreateViewHolder(android.view.ViewGroup parent, int viewType)` Adapter
`void` `replaceItem(int index, AlarmData data)`
`void` `setVisibleFooter(boolean isFooter)`

### Methods inherited from class android.support.v7.widget.RecyclerView.Adapter

`bindViewHolder, createViewHolder, getItemId, 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

#### mContext

    private android.content.Context mContext

#### ZERO

    private final int ZERO

See Also:
  Constant Field Values

#### COUNT_EMPTY

    private final int COUNT_EMPTY

See Also:
  Constant Field Values

#### COUNT_FOOTER_LOADING

    private final int COUNT_FOOTER_LOADING

See Also:
  Constant Field Values

#### TYPE_EMPTY

    private final int TYPE_EMPTY

See Also:
  Constant Field Values

#### TYPE_ALARM

    private final int TYPE_ALARM

See Also:
  Constant Field Values

#### TYPE_FOOTER_LOADING

    private final int TYPE_FOOTER_LOADING

See Also:
  Constant Field Values

#### mOnAlarmListListener

    private AlarmListContract.OnAlarmListListener mOnAlarmListListener

#### mListData

    private java.util.ArrayList<AlarmData> mListData

#### isVisibleFooter

    private boolean isVisibleFooter

### Constructor Detail

#### AlarmListAdapter

    public AlarmListAdapter(@NonNull
                            android.content.Context context,
                            @NonNull
                            AlarmListContract.OnAlarmListListener onAlarmListListener)

### Method Detail

#### getItemViewType

    public int getItemViewType(int position)

View

Overrides:
  `getItemViewType` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

#### notifyDataAll

    public void notifyDataAll()

Specified by:
  `notifyDataAll` in interface `AlarmListContract.View`

#### notifyDataRangeChanged

    public void notifyDataRangeChanged(int positionStart,
                                       int itemCount)

Specified by:
  `notifyDataRangeChanged` in interface `AlarmListContract.View`

#### addItems

    public void addItems(java.util.ArrayList<AlarmData> list)

Model

Specified by:
  `addItems` in interface `AlarmListContract.Model`

#### replaceItem

    public void replaceItem(int index,
                            AlarmData data)

Specified by:
  `replaceItem` in interface `AlarmListContract.Model`

#### setVisibleFooter

    public void setVisibleFooter(boolean isFooter)

Specified by:
  `setVisibleFooter` in interface `AlarmListContract.Model`

#### onCreateViewHolder

    public android.support.v7.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent,
                                                                                int viewType)

Adapter

Specified by:
  `onCreateViewHolder` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

#### onBindViewHolder

    public void onBindViewHolder(android.support.v7.widget.RecyclerView.ViewHolder holder,
                                 int position)

Specified by:
  `onBindViewHolder` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

#### getItemCount

    public int getItemCount()

Specified by:
  `getItemCount` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

#### isEmpty

    private boolean isEmpty()

#### isFooter

    private boolean isFooter(int position)