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

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

import kr.co.hanwha.hifive.R;
import kr.co.hanwha.hifive.base.BaseViewHolder;

/**
 * Created by sanghoonkwon on 2018. 2. 12..
 */

public class MainEmptyFamousSayingListViewHolder extends BaseViewHolder {
    private TextView mTextViewTitle;
    private TextView mTextViewSubTitle;
    private LinearLayout mLayoutContainer;

    public MainEmptyFamousSayingListViewHolder(@NonNull ViewGroup viewGroup) {

        super(viewGroup, R.layout.item_main_empty_famous_saying_list);

        mTextViewTitle = (TextView) itemView.findViewById(R.id.title_textView);
        mTextViewSubTitle = (TextView) itemView.findViewById(R.id.subTitle_textView);
        mLayoutContainer = (LinearLayout) itemView.findViewById(R.id.container_linearLayout);
    }

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

//        String message = (String) object;
//        mTextViewEmpty.setText(message);


        if (height > 0) {
            LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height);
            mLayoutContainer.setLayoutParams(param);
        }
    }
}