// Path: app/src/main/java/news/androidtv/tvapprepo/model/SettingOption.java
// public class SettingOption {
//     private Drawable mIcon;
//     private String mTitle;
//     private OnClickListener mOnClickListener;
// 
//     public SettingOption(Drawable drawable, String text, OnClickListener onClickListener) {
//         mIcon = drawable;
//         mTitle = text;
//         mOnClickListener = onClickListener;
//     }
// 
//     public Drawable getDrawable() {
//         return mIcon;
//     }
// 
//     public String getText() {
//         return mTitle;
//     }
// 
//     public OnClickListener getClickListener() {
//         return mOnClickListener;
//     }
// 
//     public interface OnClickListener {
//         void onClick();
//     }
// }


import android.support.v17.leanback.widget.ImageCardView;
import android.support.v17.leanback.widget.Presenter;
import android.view.ContextThemeWrapper;
import android.view.ViewGroup;
import android.widget.ImageView;
import news.androidtv.tvapprepo.R;
import news.androidtv.tvapprepo.model.SettingOption;

package news.androidtv.tvapprepo.presenters;



/**
 * A presenter which can be used to show options with an optional title along the bottom.
 *
 * @author Nick
 * @version 2016.09.04
 */
public class OptionsCardPresenter extends CardPresenter {
    private ContextThemeWrapper contextThemeWrapper;

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent) {
        if (contextThemeWrapper == null) {
            contextThemeWrapper = new ContextThemeWrapper(parent.getContext(),
                    R.style.OptionsImageCardViewStyle);
        }
        ImageCardView cardView = new ImageCardView(contextThemeWrapper);
        cardView.setFocusable(true);
        cardView.setFocusableInTouchMode(true);
        cardView.setBackgroundColor(parent.getResources().getColor(R.color.primaryDark));
        return new ViewHolder(cardView);
    }

    @Override
    public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {

// Path: app/src/main/java/news/androidtv/tvapprepo/model/SettingOption.java
// public class SettingOption {
//     private Drawable mIcon;
//     private String mTitle;
//     private OnClickListener mOnClickListener;
// 
//     public SettingOption(Drawable drawable, String text, OnClickListener onClickListener) {
//         mIcon = drawable;
//         mTitle = text;
//         mOnClickListener = onClickListener;
//     }
// 
//     public Drawable getDrawable() {
//         return mIcon;
//     }
// 
//     public String getText() {
//         return mTitle;
//     }
// 
//     public OnClickListener getClickListener() {
//         return mOnClickListener;
//     }
// 
//     public interface OnClickListener {
//         void onClick();
//     }
// }


// Path: app/src/main/java/news/androidtv/tvapprepo/presenters/OptionsCardPresenter.java
import android.support.v17.leanback.widget.ImageCardView;
import android.support.v17.leanback.widget.Presenter;
import android.view.ContextThemeWrapper;
import android.view.ViewGroup;
import android.widget.ImageView;
import news.androidtv.tvapprepo.R;
import news.androidtv.tvapprepo.model.SettingOption;

package news.androidtv.tvapprepo.presenters;



/**
 * A presenter which can be used to show options with an optional title along the bottom.
 *
 * @author Nick
 * @version 2016.09.04
 */
public class OptionsCardPresenter extends CardPresenter {
    private ContextThemeWrapper contextThemeWrapper;

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent) {
        if (contextThemeWrapper == null) {
            contextThemeWrapper = new ContextThemeWrapper(parent.getContext(),
                    R.style.OptionsImageCardViewStyle);
        }
        ImageCardView cardView = new ImageCardView(contextThemeWrapper);
        cardView.setFocusable(true);
        cardView.setFocusableInTouchMode(true);
        cardView.setBackgroundColor(parent.getResources().getColor(R.color.primaryDark));
        return new ViewHolder(cardView);
    }

    @Override
    public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {

        final SettingOption option = (SettingOption) item;
