// Path: app/src/main/java/org/wordcamp/android/adapters/SpeakersListAdapter.java
// public class SpeakersListAdapter extends RecyclerView.Adapter<SpeakersListAdapter.ViewHolder> {
// 
//     private Context context;
//     private LayoutInflater inflater;
//     private List<SpeakerDB> speakerDBList;
//     private OnSpeakerSelectedListener speakerSelectedListener;
// 
//     public SpeakersListAdapter(Context ctx, List<SpeakerDB> speakerDBList) {
//         this.context = ctx;
//         inflater = LayoutInflater.from(this.context);
//         this.speakerDBList = speakerDBList;
//     }
// 
//     public void setOnSpeakerSelectedListener(OnSpeakerSelectedListener listener) {
//         speakerSelectedListener = listener;
//     }
// 
//     public interface OnSpeakerSelectedListener {
//         void onSpeakerSelected(SpeakerDB speakerDB);
//     }
// 
//     @Override
//     public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View v = inflater.inflate(R.layout.item_speaker, parent, false);
//         ViewHolder holder = new ViewHolder(v);
//         return holder;
//     }
// 
//     @Override
//     public void onBindViewHolder(ViewHolder holder, int position) {
//         final SpeakerDB speakerDB = speakerDBList.get(position);
//         holder.title.setText(speakerDB.getName());
//         Picasso.with(context).load(speakerDB.getGravatar())
//                 .placeholder(R.drawable.ic_account_circle_grey600).into(holder.dp);
// 
//         holder.itemView.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View view) {
//                 speakerSelectedListener.onSpeakerSelected(speakerDB);
//             }
//         });
//     }
// 
//     @Override
//     public long getItemId(int position) {
//         return position;
//     }
// 
//     @Override
//     public int getItemCount() {
//         return speakerDBList.size();
//     }
// 
//     static class ViewHolder extends RecyclerView.ViewHolder {
//         TextView title;
//         CircleImageView dp;
// 
//         public ViewHolder(View itemView) {
//             super(itemView);
//             title = (TextView) itemView.findViewById(R.id.speaker_name);
//             dp = (CircleImageView) itemView.findViewById(R.id.speaker_avatar);
//         }
//     }
// }
// 
// Path: app/src/main/java/org/wordcamp/android/objects/SpeakerDB.java
// public class SpeakerDB implements Serializable {
// 
//     private int wc_id;
//     private String name;
//     private int speaker_id;
//     private String info;
//     private String featured_image;
//     private String last_scanned_gmt;
//     private String gson_object;
//     private String gravatar;
// 
//     public SpeakerDB(int wc_id, String name, int speaker_id,
//                      String info, String featured_image,
//                      String last_scanned_gmt, String gson_object, String gravatar) {
//         this.wc_id = wc_id;
//         this.name = name;
//         this.speaker_id = speaker_id;
//         this.info = info;
//         this.featured_image = featured_image;
//         this.last_scanned_gmt = last_scanned_gmt;
//         this.gson_object = gson_object;
//         this.gravatar = gravatar;
//     }
// 
//     public String getGravatar() {
//         return gravatar;
//     }
// 
//     public void setGravatar(String gravatar) {
//         this.gravatar = gravatar;
//     }
// 
//     public int getWc_id() {
//         return wc_id;
//     }
// 
//     public void setWc_id(int wc_id) {
//         this.wc_id = wc_id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public int getSpeaker_id() {
//         return speaker_id;
//     }
// 
//     public void setSpeaker_id(int speaker_id) {
//         this.speaker_id = speaker_id;
//     }
// 
//     public String getInfo() {
//         return info;
//     }
// 
//     public void setInfo(String info) {
//         this.info = info;
//     }
// 
//     public String getFeatured_image() {
//         return featured_image;
//     }
// 
//     public void setFeatured_image(String featured_image) {
//         this.featured_image = featured_image;
//     }
// 
//     public String getLast_scanned_gmt() {
//         return last_scanned_gmt;
//     }
// 
//     public void setLast_scanned_gmt(String last_scanned_gmt) {
//         this.last_scanned_gmt = last_scanned_gmt;
//     }
// 
//     public String getGson_object() {
//         return gson_object;
//     }
// 
//     public void setGson_object(String gson_object) {
//         this.gson_object = gson_object;
//     }
// }


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.wordcamp.android.R;
import org.wordcamp.android.WordCampDetailActivity;
import org.wordcamp.android.adapters.SpeakersListAdapter;
import org.wordcamp.android.objects.SpeakerDB;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
package org.wordcamp.android.wcdetails;




/**
 * Created by aagam on 29/1/15.
 */
public class SpeakerFragment extends Fragment implements SpeakersListAdapter.OnSpeakerSelectedListener {

    private RecyclerView lv;
    private View emptyView;
// Path: app/src/main/java/org/wordcamp/android/adapters/SpeakersListAdapter.java
// public class SpeakersListAdapter extends RecyclerView.Adapter<SpeakersListAdapter.ViewHolder> {
// 
//     private Context context;
//     private LayoutInflater inflater;
//     private List<SpeakerDB> speakerDBList;
//     private OnSpeakerSelectedListener speakerSelectedListener;
// 
//     public SpeakersListAdapter(Context ctx, List<SpeakerDB> speakerDBList) {
//         this.context = ctx;
//         inflater = LayoutInflater.from(this.context);
//         this.speakerDBList = speakerDBList;
//     }
// 
//     public void setOnSpeakerSelectedListener(OnSpeakerSelectedListener listener) {
//         speakerSelectedListener = listener;
//     }
// 
//     public interface OnSpeakerSelectedListener {
//         void onSpeakerSelected(SpeakerDB speakerDB);
//     }
// 
//     @Override
//     public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View v = inflater.inflate(R.layout.item_speaker, parent, false);
//         ViewHolder holder = new ViewHolder(v);
//         return holder;
//     }
// 
//     @Override
//     public void onBindViewHolder(ViewHolder holder, int position) {
//         final SpeakerDB speakerDB = speakerDBList.get(position);
//         holder.title.setText(speakerDB.getName());
//         Picasso.with(context).load(speakerDB.getGravatar())
//                 .placeholder(R.drawable.ic_account_circle_grey600).into(holder.dp);
// 
//         holder.itemView.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View view) {
//                 speakerSelectedListener.onSpeakerSelected(speakerDB);
//             }
//         });
//     }
// 
//     @Override
//     public long getItemId(int position) {
//         return position;
//     }
// 
//     @Override
//     public int getItemCount() {
//         return speakerDBList.size();
//     }
// 
//     static class ViewHolder extends RecyclerView.ViewHolder {
//         TextView title;
//         CircleImageView dp;
// 
//         public ViewHolder(View itemView) {
//             super(itemView);
//             title = (TextView) itemView.findViewById(R.id.speaker_name);
//             dp = (CircleImageView) itemView.findViewById(R.id.speaker_avatar);
//         }
//     }
// }
// 
// Path: app/src/main/java/org/wordcamp/android/objects/SpeakerDB.java
// public class SpeakerDB implements Serializable {
// 
//     private int wc_id;
//     private String name;
//     private int speaker_id;
//     private String info;
//     private String featured_image;
//     private String last_scanned_gmt;
//     private String gson_object;
//     private String gravatar;
// 
//     public SpeakerDB(int wc_id, String name, int speaker_id,
//                      String info, String featured_image,
//                      String last_scanned_gmt, String gson_object, String gravatar) {
//         this.wc_id = wc_id;
//         this.name = name;
//         this.speaker_id = speaker_id;
//         this.info = info;
//         this.featured_image = featured_image;
//         this.last_scanned_gmt = last_scanned_gmt;
//         this.gson_object = gson_object;
//         this.gravatar = gravatar;
//     }
// 
//     public String getGravatar() {
//         return gravatar;
//     }
// 
//     public void setGravatar(String gravatar) {
//         this.gravatar = gravatar;
//     }
// 
//     public int getWc_id() {
//         return wc_id;
//     }
// 
//     public void setWc_id(int wc_id) {
//         this.wc_id = wc_id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public int getSpeaker_id() {
//         return speaker_id;
//     }
// 
//     public void setSpeaker_id(int speaker_id) {
//         this.speaker_id = speaker_id;
//     }
// 
//     public String getInfo() {
//         return info;
//     }
// 
//     public void setInfo(String info) {
//         this.info = info;
//     }
// 
//     public String getFeatured_image() {
//         return featured_image;
//     }
// 
//     public void setFeatured_image(String featured_image) {
//         this.featured_image = featured_image;
//     }
// 
//     public String getLast_scanned_gmt() {
//         return last_scanned_gmt;
//     }
// 
//     public void setLast_scanned_gmt(String last_scanned_gmt) {
//         this.last_scanned_gmt = last_scanned_gmt;
//     }
// 
//     public String getGson_object() {
//         return gson_object;
//     }
// 
//     public void setGson_object(String gson_object) {
//         this.gson_object = gson_object;
//     }
// }


// Path: app/src/main/java/org/wordcamp/android/wcdetails/SpeakerFragment.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.wordcamp.android.R;
import org.wordcamp.android.WordCampDetailActivity;
import org.wordcamp.android.adapters.SpeakersListAdapter;
import org.wordcamp.android.objects.SpeakerDB;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

package org.wordcamp.android.wcdetails;




/**
 * Created by aagam on 29/1/15.
 */
public class SpeakerFragment extends Fragment implements SpeakersListAdapter.OnSpeakerSelectedListener {

    private RecyclerView lv;
    private View emptyView;
    private SpeakersListAdapter adapter;