package kr.co.hanwha.hifive.adapter.viewholder;

import android.support.annotation.NonNull;
import android.view.ViewGroup;
import android.widget.TextView;

import kr.co.hanwha.hifive.R;
import kr.co.hanwha.hifive.adapter.model.OkrListViewHolderData;
import kr.co.hanwha.hifive.base.BaseViewHolder;

/**
 * Created by aaron on 2018. 10. 8.
 */
public class SelectCampaignListObjectViewHolder extends BaseViewHolder {
    private TextView mTextViewObject;

    public SelectCampaignListObjectViewHolder(@NonNull ViewGroup viewGroup) {
        super(viewGroup, R.layout.item_select_campaign_list_object);

        mTextViewObject = (TextView) itemView.findViewById(R.id.object_textView);
    }

    @Override
    public void onBind(@NonNull Object object, @NonNull int index) {
        super.onBind(object, index);

        if (object instanceof OkrListViewHolderData) {
            OkrListViewHolderData data = (OkrListViewHolderData) object;
            mTextViewObject.setText(data.getDesc());
        }
    }
}
