// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/matchtemplate/data/MatchModel.java
// public class MatchModel implements Parcelable {
//     public final static Creator<MatchModel> CREATOR = new Creator<MatchModel>() {
//         @Override
//         public MatchModel createFromParcel(Parcel parcel) {
//             return new MatchModel(parcel);
//         }
// 
//         @Override
//         public MatchModel[] newArray(int size) {
//             return new MatchModel[size];
//         }
//     };
// 
//     private String matchA;
//     private String matchB;
//     private int correct;
// 
//     public MatchModel() {
// 
//     }
// 
//     private MatchModel(Parcel in) {
//         this.matchA = in.readString();
//         this.matchB = in.readString();
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(matchA);
//         dest.writeString(matchB);
//     }
// 
//     public int getCorrect() {
//         return correct;
//     }
// 
//     public void setCorrect(int correct) {
//         this.correct = correct;
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     public String getMatchA() {
//         return matchA;
//     }
// 
//     public void setMatchA(String matchA) {
//         this.matchA = matchA;
//     }
// 
//     public String getMatchB() {
//         return matchB;
//     }
// 
//     public void setMatchB(String matchB) {
//         this.matchB = matchB;
//     }
// 
// }


import android.app.FragmentManager;
import android.database.Cursor;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import org.buildmlearn.toolkit.R;
import org.buildmlearn.toolkit.matchtemplate.Constants;
import org.buildmlearn.toolkit.matchtemplate.adapter.MatchArrayAdapter_A;
import org.buildmlearn.toolkit.matchtemplate.adapter.MatchArrayAdapter_B;
import org.buildmlearn.toolkit.matchtemplate.data.MatchDb;
import org.buildmlearn.toolkit.matchtemplate.data.MatchModel;
import java.util.ArrayList;
import java.util.Collections;
package org.buildmlearn.toolkit.matchtemplate.fragment;




/**
 * Created by Anupam (opticod) on 24/7/16.
 */

/**
 * @brief Fragment for the users to match column A with column B in match template's simulator.
 */
public class MainFragment extends Fragment {

    private static final String SELECTED_KEY_A = "selected_position_a";
    private static final String SELECTED_KEY_B = "selected_position_b";

    private MatchArrayAdapter_A matchListAdapterA;
    private MatchArrayAdapter_B matchListAdapterB;
    private int mPositionA = ListView.INVALID_POSITION;
    private int mPositionB = ListView.INVALID_POSITION;
    private ListView listViewA;
    private ListView listViewB;

// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/matchtemplate/data/MatchModel.java
// public class MatchModel implements Parcelable {
//     public final static Creator<MatchModel> CREATOR = new Creator<MatchModel>() {
//         @Override
//         public MatchModel createFromParcel(Parcel parcel) {
//             return new MatchModel(parcel);
//         }
// 
//         @Override
//         public MatchModel[] newArray(int size) {
//             return new MatchModel[size];
//         }
//     };
// 
//     private String matchA;
//     private String matchB;
//     private int correct;
// 
//     public MatchModel() {
// 
//     }
// 
//     private MatchModel(Parcel in) {
//         this.matchA = in.readString();
//         this.matchB = in.readString();
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(matchA);
//         dest.writeString(matchB);
//     }
// 
//     public int getCorrect() {
//         return correct;
//     }
// 
//     public void setCorrect(int correct) {
//         this.correct = correct;
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     public String getMatchA() {
//         return matchA;
//     }
// 
//     public void setMatchA(String matchA) {
//         this.matchA = matchA;
//     }
// 
//     public String getMatchB() {
//         return matchB;
//     }
// 
//     public void setMatchB(String matchB) {
//         this.matchB = matchB;
//     }
// 
// }


// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/matchtemplate/fragment/MainFragment.java
import android.app.FragmentManager;
import android.database.Cursor;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import org.buildmlearn.toolkit.R;
import org.buildmlearn.toolkit.matchtemplate.Constants;
import org.buildmlearn.toolkit.matchtemplate.adapter.MatchArrayAdapter_A;
import org.buildmlearn.toolkit.matchtemplate.adapter.MatchArrayAdapter_B;
import org.buildmlearn.toolkit.matchtemplate.data.MatchDb;
import org.buildmlearn.toolkit.matchtemplate.data.MatchModel;
import java.util.ArrayList;
import java.util.Collections;

package org.buildmlearn.toolkit.matchtemplate.fragment;




/**
 * Created by Anupam (opticod) on 24/7/16.
 */

/**
 * @brief Fragment for the users to match column A with column B in match template's simulator.
 */
public class MainFragment extends Fragment {

    private static final String SELECTED_KEY_A = "selected_position_a";
    private static final String SELECTED_KEY_B = "selected_position_b";

    private MatchArrayAdapter_A matchListAdapterA;
    private MatchArrayAdapter_B matchListAdapterB;
    private int mPositionA = ListView.INVALID_POSITION;
    private int mPositionB = ListView.INVALID_POSITION;
    private ListView listViewA;
    private ListView listViewB;

    private ArrayList<MatchModel> matchListA;