package com.akexorcist.sleepingforless.view.bookmark;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.akexorcist.sleepingforless.R;
import com.akexorcist.sleepingforless.util.content.ContentUtility;
import com.akexorcist.sleepingforless.view.bookmark.model.BookmarkLabel;
import com.balysv.materialripple.MaterialRippleLayout;

import java.util.List;

/**
 * Created by Akexorcist on 3/10/2016 AD.
 */
public class BookmarkViewHolder extends RecyclerView.ViewHolder {
    public TextView tvTitle;
    public TextView tvLabel;
    public ImageView ivTitle;
    public MaterialRippleLayout mrlFeedButton;

    public BookmarkViewHolder(View itemView) {
        super(itemView);
        tvTitle = (TextView) itemView.findViewById(R.id.tv_bookmark_title);
        tvLabel = (TextView) itemView.findViewById(R.id.tv_bookmark_label);
        ivTitle = (ImageView) itemView.findViewById(R.id.iv_bookmark_title);
        mrlFeedButton = (MaterialRippleLayout) itemView.findViewById(R.id.mrl_bookmark_button);
        ivTitle.setVisibility(View.GONE);
    }

    public void setTitle(String title) {
        title = ContentUtility.getInstance().removeLabelFromTitle(title);
        tvTitle.setText(title);
    }

    public void setLabel(List<BookmarkLabel> labelList) {
        if (labelList != null && labelList.size() > 0) {
            String label = "";
            for (int i = 0; i < labelList.size(); i++) {
                label += labelList.get(i).getLabel();
                if (i < labelList.size() - 1) {
                    label += ", ";
                }
            }
            tvLabel.setText(label);
        } else {
            tvLabel.setVisibility(View.GONE);
        }
    }

    public void setFeedClickListener(View.OnClickListener listener) {
        mrlFeedButton.setOnClickListener(listener);
    }

    public void setFeedLongClickListener(View.OnLongClickListener listener) {
        mrlFeedButton.setOnLongClickListener(listener);
    }
}

@@ -448,16 +448,74 @@
 .List;%0A%0A
+import butterknife.Bind;%0Aimport butterknife.ButterKnife;%0A%0A
 /**%0A * C
@@ -630,534 +630,392 @@
     
-public TextView tvTitle;%0A    public TextView tvLabel;%0A    public ImageView ivTitle;%0A    public MaterialRippleLayout mrlFeedButton;%0A%0A    public BookmarkViewHolder(View itemView) %7B%0A        super(itemView);%0A        tvTitle = (TextView) itemView.findViewById(R.id.tv_bookmark_title);%0A        tvLabel = (TextView) itemView.findViewById(R.id.tv_bookmark_label);%0A        ivTitle = (ImageView) itemView.findViewById(R.id.iv_bookmark_title);%0A        mrlFeedButton = (MaterialRippleLayout) itemView.findViewById(R.id.mrl_bookmark_button
+@Bind(R.id.tv_bookmark_title)%0A    public TextView tvTitle;%0A%0A    @Bind(R.id.tv_bookmark_label)%0A    public TextView tvLabel;%0A%0A    @Bind(R.id.iv_bookmark_title)%0A    public ImageView ivTitle;%0A%0A    @Bind(R.id.mrl_bookmark_button)%0A    public MaterialRippleLayout mrlFeedButton;%0A%0A    public BookmarkViewHolder(View itemView) %7B%0A        super(itemView);%0A        ButterKnife.bind(this, itemView
 );%0A 

Use ButterKnife