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

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

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

/**
 * Created by sanghoonkwon on 2018. 1. 24..
 */

public class HomeHeaderViewHolder extends BaseViewHolder {

    public HomeHeaderViewHolder(@NonNull ViewGroup viewGroup) {

        super(viewGroup, R.layout.item_home_header);
    }

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

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