// Path: app/src/main/java/io/github/emanual/app/entity/InterviewJSONEntity.java
// public class InterviewJSONEntity extends BaseEntity {
// 
//     private String title;
//     private InterviewInfoEntity info;
// 
//     public InterviewInfoEntity getInfo() {
//         return info;
//     }
// 
//     public void setInfo(InterviewInfoEntity info) {
//         this.info = info;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     @Override public String toString() {
//         return "InterviewJSONEntity{" +
//                 "info=" + info +
//                 ", title='" + title + '\'' +
//                 '}';
//     }
// }
// 
// Path: app/src/main/java/io/github/emanual/app/ui/QuestionListActivity.java
// public class QuestionListActivity extends SwipeBackActivity {
//     public static final String EXTRA_INTERVIEW = "EXTRA_INTERVIEW";
//     public static final String EXTRA_INDEX_PAGE = "INDEX_PAGE";
// 
//     InterviewJSONEntity interviewJSONEntity;
//     ProgressDialog mProgressDialog;
//     @Bind(R.id.recyclerView) RecyclerView recyclerView;
// 
//     @Override protected void initData(Bundle savedInstanceState) {
//         interviewJSONEntity = (InterviewJSONEntity)getIntent().getSerializableExtra(EXTRA_INTERVIEW);
//         if(interviewJSONEntity == null){
//             finish();
//         }
//     }
// 
//     @Override protected void initLayout(Bundle savedInstanceState) {
//         if(isFinishing()){
//             return;
//         }
// 
//         setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
//         getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//         getSupportActionBar().setTitle(R.string.acty_question_list);
// 
//         mProgressDialog = new ProgressDialog(getContext());
//         mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
// 
//         recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
// 
//         EventBus.getDefault().post(new GetQuestionListEvent(interviewJSONEntity.getInfo().getName()));
//     }
// 
//     @Override protected int getContentViewId() {
//         return R.layout.acty_question_list;
//     }
// 
//     @Subscribe(threadMode = ThreadMode.Async)
//     public void onGetQuestionsList(GetQuestionListEvent event){
//         List<QuestionEntity> data = InterviewResource.getQuestionList(getContext(), event.getInterviewName());
//         EventBus.getDefault().post(new FinishLoadQuestionListEvent(data));
//     }
// 
//     @Subscribe(threadMode = ThreadMode.MainThread)
//     public void onFinishLoadQuestionList(FinishLoadQuestionListEvent event){
//         recyclerView.setAdapter(new QuestionListAdapter(getContext(), event.getQuestionEntityList()));
//     }
// }


import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import io.github.emanual.app.R;
import io.github.emanual.app.entity.InterviewJSONEntity;
import io.github.emanual.app.ui.QuestionListActivity;
package io.github.emanual.app.ui.adapter;





/**
 * Author: jayin
 * Date: 2/25/16
 */
public class InterviewListAdapter extends  RecyclerView.Adapter<InterviewListAdapter.ViewHolder>{
    Context context;
    List<InterviewJSONEntity> data;

    public InterviewListAdapter(Context context, List<InterviewJSONEntity> data){
        this.context = context;
        this.data = data;
    }

    public Context getContext() {
        return context;
    }

    public List<InterviewJSONEntity> getData() {
        return data;
    }

    @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.adapter_interviewlist, parent, false));
    }

    @Override public void onBindViewHolder(ViewHolder holder, int position) {
        final InterviewJSONEntity item = data.get(position);
        holder.tv_name.setText(item.getInfo().getName_cn());
        holder.iv_icon.setImageURI(Uri.parse(item.getInfo().getIcon_url()));
        holder.layout_container.setOnClickListener(new View.OnClickListener() {
            @Override public void onClick(View v) {
                Intent intent = new Intent(getContext(), QuestionListActivity.class);
// Path: app/src/main/java/io/github/emanual/app/entity/InterviewJSONEntity.java
// public class InterviewJSONEntity extends BaseEntity {
// 
//     private String title;
//     private InterviewInfoEntity info;
// 
//     public InterviewInfoEntity getInfo() {
//         return info;
//     }
// 
//     public void setInfo(InterviewInfoEntity info) {
//         this.info = info;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     @Override public String toString() {
//         return "InterviewJSONEntity{" +
//                 "info=" + info +
//                 ", title='" + title + '\'' +
//                 '}';
//     }
// }
// 
// Path: app/src/main/java/io/github/emanual/app/ui/QuestionListActivity.java
// public class QuestionListActivity extends SwipeBackActivity {
//     public static final String EXTRA_INTERVIEW = "EXTRA_INTERVIEW";
//     public static final String EXTRA_INDEX_PAGE = "INDEX_PAGE";
// 
//     InterviewJSONEntity interviewJSONEntity;
//     ProgressDialog mProgressDialog;
//     @Bind(R.id.recyclerView) RecyclerView recyclerView;
// 
//     @Override protected void initData(Bundle savedInstanceState) {
//         interviewJSONEntity = (InterviewJSONEntity)getIntent().getSerializableExtra(EXTRA_INTERVIEW);
//         if(interviewJSONEntity == null){
//             finish();
//         }
//     }
// 
//     @Override protected void initLayout(Bundle savedInstanceState) {
//         if(isFinishing()){
//             return;
//         }
// 
//         setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
//         getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//         getSupportActionBar().setTitle(R.string.acty_question_list);
// 
//         mProgressDialog = new ProgressDialog(getContext());
//         mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
// 
//         recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
// 
//         EventBus.getDefault().post(new GetQuestionListEvent(interviewJSONEntity.getInfo().getName()));
//     }
// 
//     @Override protected int getContentViewId() {
//         return R.layout.acty_question_list;
//     }
// 
//     @Subscribe(threadMode = ThreadMode.Async)
//     public void onGetQuestionsList(GetQuestionListEvent event){
//         List<QuestionEntity> data = InterviewResource.getQuestionList(getContext(), event.getInterviewName());
//         EventBus.getDefault().post(new FinishLoadQuestionListEvent(data));
//     }
// 
//     @Subscribe(threadMode = ThreadMode.MainThread)
//     public void onFinishLoadQuestionList(FinishLoadQuestionListEvent event){
//         recyclerView.setAdapter(new QuestionListAdapter(getContext(), event.getQuestionEntityList()));
//     }
// }


// Path: app/src/main/java/io/github/emanual/app/ui/adapter/InterviewListAdapter.java
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import io.github.emanual.app.R;
import io.github.emanual.app.entity.InterviewJSONEntity;
import io.github.emanual.app.ui.QuestionListActivity;

package io.github.emanual.app.ui.adapter;





/**
 * Author: jayin
 * Date: 2/25/16
 */
public class InterviewListAdapter extends  RecyclerView.Adapter<InterviewListAdapter.ViewHolder>{
    Context context;
    List<InterviewJSONEntity> data;

    public InterviewListAdapter(Context context, List<InterviewJSONEntity> data){
        this.context = context;
        this.data = data;
    }

    public Context getContext() {
        return context;
    }

    public List<InterviewJSONEntity> getData() {
        return data;
    }

    @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.adapter_interviewlist, parent, false));
    }

    @Override public void onBindViewHolder(ViewHolder holder, int position) {
        final InterviewJSONEntity item = data.get(position);
        holder.tv_name.setText(item.getInfo().getName_cn());
        holder.iv_icon.setImageURI(Uri.parse(item.getInfo().getIcon_url()));
        holder.layout_container.setOnClickListener(new View.OnClickListener() {
            @Override public void onClick(View v) {
                Intent intent = new Intent(getContext(), QuestionListActivity.class);
                intent.putExtra(QuestionListActivity.EXTRA_INTERVIEW, item);