// Path: app/src/main/java/com/ae/apps/tripmeter/listeners/ExpenseListUpdateListener.java
// public interface ExpenseListUpdateListener {
//     /**
//      * Indicates the user wants to delete a trip
//      *
//      * @param trip Trip to be deleted
//      */
//     void deleteTrip(Trip trip);
// 
//     /**
//      * Indicates an update to a trip
//      *
//      * @param trip Trip that is updated
//      */
//     void updateTrip(Trip trip);
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/listeners/ExpensesInteractionListener.java
// public interface ExpensesInteractionListener {
// 
//     /**
//      * Navigate to the Trip Details
//      *
//      * @param trip the trip
//      */
//     void showTripDetails(Trip trip);
// 
//     /**
//      * Show the FAB to add a new trip in the main activity
//      *
//      */
//     void showAddTripFAB();
// 
//     /**
//      * Registers a listener for the FAB click hosted on the main activity
//      *
//      * @param clickListener
//      */
//     void registerFABListener(FloatingActionButtonClickListener clickListener);
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/models/Trip.java
// public class Trip {
//     private String id;
//     private String name;
//     private String memberIds;
//     private long startDate;
//     private float totalExpenses;
//     private boolean isSettled;
// 
//     private List<ContactVo> members;
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setMemberIds(String memberIds) {
//         this.memberIds = memberIds;
//     }
// 
//     public String getMemberIds() {
//         return memberIds;
//     }
// 
//     public void setStartDate(long startDate) {
//         this.startDate = startDate;
//     }
// 
//     public long getStartDate() {
//         return startDate;
//     }
// 
//     public void setTotalExpenses(float totalExpenses) {
//         this.totalExpenses = totalExpenses;
//     }
// 
//     public float getTotalExpenses() {
//         return totalExpenses;
//     }
// 
//     public void setSettled(boolean settled) {
//         isSettled = settled;
//     }
// 
//     public boolean isSettled() {
//         return isSettled;
//     }
// 
//     public List<ContactVo> getMembers() {
//         if(null == members){
//             members = new ArrayList<>();
//         }
//         return members;
//     }
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/utils/AppConstants.java
// public interface AppConstants {
// 
//     String RESULT_FORMAT = "%.02f";
//     String PREF_KEY_FUEL_PRICE = "pref_key_fuel_price";
//     String PREF_KEY_MILEAGE = "pref_key_mileage";
//     String PREF_KEY_LAST_FEATURE = "pref_key_last_feature";
//     String PREF_KEY_CURRENT_PROFILE = "pref_key_profile_contact_id";
// 
//     String KEY_TRIP_ID = "key_trip_id";
//     String TRIP_DATE_FORMAT = "EEE, dd MMM yyyy";
// 
//     String CONTACT_ID_SEPARATOR = ",";
// }


import com.ae.apps.tripmeter.listeners.ExpenseListUpdateListener;
import com.ae.apps.tripmeter.listeners.ExpensesInteractionListener;
import com.ae.apps.tripmeter.models.Trip;
import com.ae.apps.tripmeter.utils.AppConstants;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.ae.apps.tripmeter.R;
            }
        });

        holder.mPopupMenu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showPopupMenu(holder.mPopupMenu, position);
            }
        });

    }

    private void showPopupMenu(View mPopupMenu, int position) {
        PopupMenu popupMenu = new PopupMenu(mPopupMenu.getContext(), mPopupMenu);
        MenuInflater menuInflater = popupMenu.getMenuInflater();
        menuInflater.inflate(R.menu.trip_popup_menu, popupMenu.getMenu());
        popupMenu.setOnMenuItemClickListener(new TripMenuItemClickListener(position));
        popupMenu.show();
    }

    @Override
    public int getItemCount() {
        return mValues.size();
    }

    class ViewHolder extends RecyclerView.ViewHolder {
        final View mView;
        final TextView mTripName;
        final TextView mTripDate;
        final TextView mTripMemberCount;
// Path: app/src/main/java/com/ae/apps/tripmeter/listeners/ExpenseListUpdateListener.java
// public interface ExpenseListUpdateListener {
//     /**
//      * Indicates the user wants to delete a trip
//      *
//      * @param trip Trip to be deleted
//      */
//     void deleteTrip(Trip trip);
// 
//     /**
//      * Indicates an update to a trip
//      *
//      * @param trip Trip that is updated
//      */
//     void updateTrip(Trip trip);
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/listeners/ExpensesInteractionListener.java
// public interface ExpensesInteractionListener {
// 
//     /**
//      * Navigate to the Trip Details
//      *
//      * @param trip the trip
//      */
//     void showTripDetails(Trip trip);
// 
//     /**
//      * Show the FAB to add a new trip in the main activity
//      *
//      */
//     void showAddTripFAB();
// 
//     /**
//      * Registers a listener for the FAB click hosted on the main activity
//      *
//      * @param clickListener
//      */
//     void registerFABListener(FloatingActionButtonClickListener clickListener);
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/models/Trip.java
// public class Trip {
//     private String id;
//     private String name;
//     private String memberIds;
//     private long startDate;
//     private float totalExpenses;
//     private boolean isSettled;
// 
//     private List<ContactVo> members;
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setMemberIds(String memberIds) {
//         this.memberIds = memberIds;
//     }
// 
//     public String getMemberIds() {
//         return memberIds;
//     }
// 
//     public void setStartDate(long startDate) {
//         this.startDate = startDate;
//     }
// 
//     public long getStartDate() {
//         return startDate;
//     }
// 
//     public void setTotalExpenses(float totalExpenses) {
//         this.totalExpenses = totalExpenses;
//     }
// 
//     public float getTotalExpenses() {
//         return totalExpenses;
//     }
// 
//     public void setSettled(boolean settled) {
//         isSettled = settled;
//     }
// 
//     public boolean isSettled() {
//         return isSettled;
//     }
// 
//     public List<ContactVo> getMembers() {
//         if(null == members){
//             members = new ArrayList<>();
//         }
//         return members;
//     }
// }
// 
// Path: app/src/main/java/com/ae/apps/tripmeter/utils/AppConstants.java
// public interface AppConstants {
// 
//     String RESULT_FORMAT = "%.02f";
//     String PREF_KEY_FUEL_PRICE = "pref_key_fuel_price";
//     String PREF_KEY_MILEAGE = "pref_key_mileage";
//     String PREF_KEY_LAST_FEATURE = "pref_key_last_feature";
//     String PREF_KEY_CURRENT_PROFILE = "pref_key_profile_contact_id";
// 
//     String KEY_TRIP_ID = "key_trip_id";
//     String TRIP_DATE_FORMAT = "EEE, dd MMM yyyy";
// 
//     String CONTACT_ID_SEPARATOR = ",";
// }


// Path: app/src/main/java/com/ae/apps/tripmeter/views/adapters/TripRecyclerViewAdapter.java
import com.ae.apps.tripmeter.listeners.ExpenseListUpdateListener;
import com.ae.apps.tripmeter.listeners.ExpensesInteractionListener;
import com.ae.apps.tripmeter.models.Trip;
import com.ae.apps.tripmeter.utils.AppConstants;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.ae.apps.tripmeter.R;

            }
        });

        holder.mPopupMenu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showPopupMenu(holder.mPopupMenu, position);
            }
        });

    }

    private void showPopupMenu(View mPopupMenu, int position) {
        PopupMenu popupMenu = new PopupMenu(mPopupMenu.getContext(), mPopupMenu);
        MenuInflater menuInflater = popupMenu.getMenuInflater();
        menuInflater.inflate(R.menu.trip_popup_menu, popupMenu.getMenu());
        popupMenu.setOnMenuItemClickListener(new TripMenuItemClickListener(position));
        popupMenu.show();
    }

    @Override
    public int getItemCount() {
        return mValues.size();
    }

    class ViewHolder extends RecyclerView.ViewHolder {
        final View mView;
        final TextView mTripName;
        final TextView mTripDate;
        final TextView mTripMemberCount;
        final ImageView mPopupMenu;