() {
+ @Override
+ public MatchMetaModel createFromParcel(Parcel parcel) {
+ return new MatchMetaModel(parcel);
+ }
+
+ @Override
+ public MatchMetaModel[] newArray(int size) {
+ return new MatchMetaModel[size];
+ }
+ };
+ private String title;
+ private String first_list_title;
+ private String second_list_title;
+
+ public MatchMetaModel(String t, String A, String B) {
+ this.title = t;
+ this.first_list_title = A;
+ this.second_list_title = B;
+ }
+
+ private MatchMetaModel(Parcel in) {
+ this.title = in.readString();
+ this.first_list_title = in.readString();
+ this.second_list_title = in.readString();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(title);
+ dest.writeString(first_list_title);
+ dest.writeString(second_list_title);
+ }
+
+ public String getFirstListTitle() {
+ return first_list_title;
+ }
+
+ public String getSecondListTitle() {
+ return second_list_title;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+}
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/data/MatchModel.java b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/data/MatchModel.java
new file mode 100644
index 0000000..a578867
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/data/MatchModel.java
@@ -0,0 +1,73 @@
+package org.buildmlearn.matchtemplate.data;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @brief Model class for Match The Following Template Editor data
+ *
+ * Created by Anupam (opticod) on 24/7/16.
+ */
+
+public class MatchModel implements Parcelable {
+ public final static Parcelable.Creator CREATOR = new Parcelable.Creator() {
+ @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;
+ }
+
+}
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/DetailActivityFragment.java b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/DetailActivityFragment.java
new file mode 100644
index 0000000..a12bbda
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/DetailActivityFragment.java
@@ -0,0 +1,191 @@
+package org.buildmlearn.matchtemplate.fragment;
+
+import android.content.Intent;
+import android.database.Cursor;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.content.ContextCompat;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import org.buildmlearn.matchtemplate.Constants;
+import org.buildmlearn.matchtemplate.R;
+import org.buildmlearn.matchtemplate.activities.MainActivity;
+import org.buildmlearn.matchtemplate.adapter.MatchArrayAdapter_A;
+import org.buildmlearn.matchtemplate.adapter.MatchArrayAdapter_B;
+import org.buildmlearn.matchtemplate.data.MatchDb;
+import org.buildmlearn.matchtemplate.data.MatchModel;
+
+import java.util.ArrayList;
+import java.util.Locale;
+
+/**
+ * @brief Activity for displaying score with matched results in match template's app.
+ *
+ * Created by Anupam (opticod) on 26/7/16.
+ */
+public class DetailActivityFragment extends Fragment {
+
+ private static final String SELECTED_KEY_A = "selected_position_a";
+ private static final String SELECTED_KEY_B = "selected_position_b";
+
+ private int mPositionA = ListView.INVALID_POSITION;
+ private int mPositionB = ListView.INVALID_POSITION;
+ private ListView listViewA;
+ private ListView listViewB;
+
+ private ArrayList matchListA;
+ private ArrayList matchListB;
+ private MatchDb db;
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ outState.putParcelableArrayList("matchListA", matchListA);
+ outState.putParcelableArrayList("matchListB", matchListB);
+ if (mPositionA != ListView.INVALID_POSITION) {
+ outState.putInt(SELECTED_KEY_A, mPositionA);
+ }
+ if (mPositionB != ListView.INVALID_POSITION) {
+ outState.putInt(SELECTED_KEY_B, mPositionB);
+ }
+ super.onSaveInstanceState(outState);
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ if (savedInstanceState == null || !savedInstanceState.containsKey("matchListA") || !savedInstanceState.containsKey("matchListB")) {
+ matchListA = new ArrayList<>();
+ matchListB = new ArrayList<>();
+ } else {
+ matchListA = savedInstanceState.getParcelableArrayList("matchListA");
+ matchListB = savedInstanceState.getParcelableArrayList("matchListB");
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+
+ db = new MatchDb(getContext());
+ db.open();
+
+ Bundle arguments = getArguments();
+ if (arguments != null) {
+ matchListA = arguments.getParcelableArrayList(Constants.first_list);
+ matchListB = arguments.getParcelableArrayList(Constants.second_list);
+ }
+
+ long countScore = 0;
+ for (int i = 0; i < matchListA.size(); i++) {
+ MatchModel matchA = matchListA.get(i);
+ MatchModel matchB = matchListB.get(i);
+ if (!matchA.getMatchA().equals(matchB.getMatchA())) {
+ matchA.setCorrect(1);
+ matchB.setCorrect(1);
+ } else {
+ countScore++;
+ matchA.setCorrect(2);
+ matchB.setCorrect(2);
+ }
+ }
+
+
+ MatchArrayAdapter_A matchListAdapterA = new MatchArrayAdapter_A(
+ getActivity(), matchListA);
+
+ MatchArrayAdapter_B matchListAdapterB = new MatchArrayAdapter_B(
+ getActivity(), matchListB);
+
+ View rootView = inflater.inflate(R.layout.fragment_main, container, false);
+
+ listViewA = (ListView) rootView.findViewById(R.id.list_view_match_A);
+ listViewB = (ListView) rootView.findViewById(R.id.list_view_match_B);
+
+ ColorDrawable colDivider = new ColorDrawable(ContextCompat.getColor(getContext(), R.color.white_primary_text));
+ listViewA.setDivider(colDivider);
+ listViewB.setDivider(colDivider);
+
+ listViewA.setDividerHeight(2);
+ listViewB.setDividerHeight(2);
+
+ handleListViewListeners();
+
+ listViewA.setAdapter(matchListAdapterA);
+ listViewB.setAdapter(matchListAdapterB);
+
+ View header_A = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_detail_header_a, null);
+ View footer_A = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_detail_footer_a, null);
+ listViewA.addHeaderView(header_A);
+ listViewA.addFooterView(footer_A);
+
+ View header_B = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_detail_header_b, null);
+ View footer_B = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_detail_footer_b, null);
+ listViewB.addHeaderView(header_B);
+ listViewB.addFooterView(footer_B);
+
+ ((TextView) rootView.findViewById(R.id.score)).setText(String.format(Locale.ENGLISH, "Score : %d of %d", countScore, matchListA.size()));
+
+ if (savedInstanceState != null && savedInstanceState.containsKey(SELECTED_KEY_A) && savedInstanceState.containsKey(SELECTED_KEY_B)) {
+ mPositionA = savedInstanceState.getInt(SELECTED_KEY_A);
+ mPositionB = savedInstanceState.getInt(SELECTED_KEY_B);
+ }
+
+ rootView.findViewById(R.id.try_again).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(getActivity(), MainActivity.class)
+ .setType("text/plain")
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+
+ startActivity(intent);
+ }
+ });
+
+ Cursor meta = db.getMetaCursor();
+
+ meta.moveToFirst();
+ ((TextView) rootView.findViewById(R.id.first_list_title)).setText(meta.getString(Constants.COL_FIRST_TITLE));
+ ((TextView) rootView.findViewById(R.id.second_list_title)).setText(meta.getString(Constants.COL_SECOND_TITLE));
+
+ return rootView;
+ }
+
+ private void handleListViewListeners() {
+
+ listViewA.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+
+ return false;
+ }
+ });
+
+ listViewB.setOnScrollListener(new AbsListView.OnScrollListener() {
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ //Left empty
+ }
+
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+ View v = view.getChildAt(0);
+ if (v != null)
+ listViewA.setSelectionFromTop(firstVisibleItem, v.getTop());
+ }
+ });
+
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ db.close();
+ }
+}
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/MainActivityFragment.java b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/MainActivityFragment.java
new file mode 100644
index 0000000..10a0204
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/java/org/buildmlearn/matchtemplate/fragment/MainActivityFragment.java
@@ -0,0 +1,324 @@
+package org.buildmlearn.matchtemplate.fragment;
+
+import android.content.Intent;
+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.widget.CardView;
+import android.view.LayoutInflater;
+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.matchtemplate.Constants;
+import org.buildmlearn.matchtemplate.R;
+import org.buildmlearn.matchtemplate.activities.DetailActivity;
+import org.buildmlearn.matchtemplate.adapter.MatchArrayAdapter_A;
+import org.buildmlearn.matchtemplate.adapter.MatchArrayAdapter_B;
+import org.buildmlearn.matchtemplate.data.MatchDb;
+import org.buildmlearn.matchtemplate.data.MatchModel;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+/**
+ * @brief Activity for the users to match column A with column B in match template's app.
+ *
+ * Created by Anupam (opticod) on 24/7/16.
+ */
+public class MainActivityFragment 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 matchListA;
+ private ArrayList matchListB;
+ private MatchDb db;
+
+ private int selectedPositionA = -1;
+ private int selectedPositionB = -1;
+
+ private View selectedViewA;
+ private View selectedViewB;
+ private View clickSourceA;
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ outState.putParcelableArrayList("matchListA", matchListA);
+ outState.putParcelableArrayList("matchListB", matchListB);
+ if (mPositionA != ListView.INVALID_POSITION) {
+ outState.putInt(SELECTED_KEY_A, mPositionA);
+ }
+ if (mPositionB != ListView.INVALID_POSITION) {
+ outState.putInt(SELECTED_KEY_B, mPositionB);
+ }
+ super.onSaveInstanceState(outState);
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ if (savedInstanceState == null || !savedInstanceState.containsKey("matchListA") || !savedInstanceState.containsKey("matchListB")) {
+ matchListA = new ArrayList<>();
+ matchListB = new ArrayList<>();
+ } else {
+ matchListA = savedInstanceState.getParcelableArrayList("matchListA");
+ matchListB = savedInstanceState.getParcelableArrayList("matchListB");
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+
+ db = new MatchDb(getContext());
+ db.open();
+
+ Cursor cursorMatchesA = db.getRandMatchCursor();
+ Cursor cursorMatchesB = db.getRandMatchCursor();
+
+ Cursor meta = db.getMetaCursor();
+
+ if (cursorMatchesA != null) {
+ while (cursorMatchesA.moveToNext()) {
+ MatchModel match = new MatchModel();
+ match.setMatchA(cursorMatchesA.getString(Constants.COL_MATCH_A));
+ match.setMatchB(cursorMatchesA.getString(Constants.COL_MATCH_B));
+ matchListA.add(match);
+ }
+ cursorMatchesA.close();
+ }
+
+ if (cursorMatchesB != null) {
+ while (cursorMatchesB.moveToNext()) {
+ MatchModel match = new MatchModel();
+ match.setMatchA(cursorMatchesB.getString(Constants.COL_MATCH_A));
+ match.setMatchB(cursorMatchesB.getString(Constants.COL_MATCH_B));
+ matchListB.add(match);
+ }
+ cursorMatchesB.close();
+ }
+
+ matchListAdapterA =
+ new MatchArrayAdapter_A(
+ getActivity(), matchListA);
+
+ matchListAdapterB =
+ new MatchArrayAdapter_B(
+ getActivity(), matchListB);
+
+ View rootView = inflater.inflate(R.layout.fragment_main, container, false);
+
+ listViewA = (ListView) rootView.findViewById(R.id.list_view_match_A);
+ listViewB = (ListView) rootView.findViewById(R.id.list_view_match_B);
+
+ handleListViewListeners();
+
+ listViewA.setAdapter(matchListAdapterA);
+ listViewB.setAdapter(matchListAdapterB);
+
+ View header_A = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_main_header_a, null);
+ View footer_A = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_main_footer_a, null);
+ listViewA.addHeaderView(header_A);
+ listViewA.addFooterView(footer_A);
+
+ View header_B = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_main_header_b, null);
+ View footer_B = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_main_footer_b, null);
+ listViewB.addHeaderView(header_B);
+ listViewB.addFooterView(footer_B);
+
+ if (savedInstanceState != null && savedInstanceState.containsKey(SELECTED_KEY_A) && savedInstanceState.containsKey(SELECTED_KEY_B)) {
+ mPositionA = savedInstanceState.getInt(SELECTED_KEY_A);
+ mPositionB = savedInstanceState.getInt(SELECTED_KEY_B);
+ }
+
+ handleButtonListener(rootView);
+
+ rootView.findViewById(R.id.check_answer).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(getActivity(), DetailActivity.class)
+ .setType("text/plain")
+ .putParcelableArrayListExtra(Constants.first_list, matchListA)
+ .putParcelableArrayListExtra(Constants.second_list, matchListB);
+ startActivity(intent);
+ }
+ });
+
+ meta.moveToFirst();
+ ((TextView) rootView.findViewById(R.id.first_list_title)).setText(meta.getString(Constants.COL_FIRST_TITLE));
+ ((TextView) rootView.findViewById(R.id.second_list_title)).setText(meta.getString(Constants.COL_SECOND_TITLE));
+
+ return rootView;
+ }
+
+ private void handleListViewListeners() {
+ listViewA.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ if (parent == clickSourceA) {
+ highlightListA(position, view);
+ }
+ }
+ });
+
+ listViewB.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ if (parent != clickSourceA) {
+ highlightListB(position, view);
+ }
+ }
+ });
+
+ listViewA.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (event.getAction() == MotionEvent.ACTION_UP) {
+ clickSourceA = v;
+ }
+ return false;
+ }
+ });
+
+ listViewB.setOnScrollListener(new AbsListView.OnScrollListener() {
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+
+ }
+
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+ View v = view.getChildAt(0);
+ if (v != null)
+ listViewA.setSelectionFromTop(firstVisibleItem, v.getTop());
+ }
+ });
+
+ }
+
+ private void handleButtonListener(View rootView) {
+ rootView.findViewById(R.id.first_list_up).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (selectedPositionA != -1 && selectedPositionA >= 1 && selectedPositionA < matchListA.size()) {
+ Collections.swap(matchListA, selectedPositionA, selectedPositionA - 1);
+ matchListAdapterA.notifyDataSetChanged();
+ highlightListA(selectedPositionA, listViewA.getChildAt(selectedPositionA));
+ }
+ }
+ });
+
+ rootView.findViewById(R.id.first_list_down).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (selectedPositionA != -1 && selectedPositionA >= 0 && selectedPositionA <= matchListA.size() - 2) {
+ Collections.swap(matchListA, selectedPositionA, selectedPositionA + 1);
+ matchListAdapterA.notifyDataSetChanged();
+ highlightListA(selectedPositionA + 2, listViewA.getChildAt(selectedPositionA + 2));
+ }
+ }
+ });
+
+ rootView.findViewById(R.id.second_list_up).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (selectedPositionB != -1 && selectedPositionB >= 1 && selectedPositionB < matchListB.size()) {
+ Collections.swap(matchListB, selectedPositionB, selectedPositionB - 1);
+ matchListAdapterB.notifyDataSetChanged();
+ highlightListB(selectedPositionB, listViewB.getChildAt(selectedPositionB));
+ }
+ }
+ });
+
+ rootView.findViewById(R.id.second_list_down).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (selectedPositionB != -1 && selectedPositionB >= 0 && selectedPositionB <= matchListB.size() - 2) {
+ Collections.swap(matchListB, selectedPositionB, selectedPositionB + 1);
+ matchListAdapterB.notifyDataSetChanged();
+ highlightListB(selectedPositionB + 2, listViewB.getChildAt(selectedPositionB + 2));
+ }
+ }
+ });
+ }
+
+ private void highlightListA(int position, View view) {
+ if (position == 0) {
+ return;
+ }
+
+ if (selectedPositionA == position - 1) {
+ selectedPositionA = -1;
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(Color.WHITE);
+ } else {
+ view.setBackgroundResource(0);
+ }
+ } else {
+ if (selectedViewA != null) {
+ if (selectedViewA instanceof CardView) {
+ ((CardView) selectedViewA).setCardBackgroundColor(Color.WHITE);
+ } else {
+ selectedViewA.setBackgroundResource(0);
+ }
+ }
+ selectedViewA = view;
+ selectedPositionA = position - 1;
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(Color.LTGRAY);
+ } else {
+ view.setBackgroundColor(ContextCompat.getColor(getActivity(), R.color.color_divider));
+ }
+ }
+ }
+
+ private void highlightListB(int position, View view) {
+ if (position == 0) {
+ return;
+ }
+
+ if (selectedPositionB == position - 1) {
+ selectedPositionB = -1;
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(Color.WHITE);
+ } else {
+ view.setBackgroundResource(0);
+ }
+ } else {
+ if (selectedViewB != null) {
+ if (selectedViewB instanceof CardView) {
+ ((CardView) selectedViewB).setCardBackgroundColor(Color.WHITE);
+ } else {
+ selectedViewB.setBackgroundResource(0);
+ }
+ }
+ selectedViewB = view;
+ selectedPositionB = position - 1;
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(Color.LTGRAY);
+ } else {
+ view.setBackgroundColor(ContextCompat.getColor(getActivity(), R.color.color_divider));
+ }
+ }
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ db.close();
+ }
+}
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/drawer_shadow.9.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..236bff5
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/drawer_shadow.9.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c7b1113
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..a74bd8c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_24dp.png
new file mode 100644
index 0000000..7f0d75c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_down_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_down_24dp.png
new file mode 100644
index 0000000..2ff816d
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/ic_keyboard_capslock_black_down_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/logo_70.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/logo_70.png
new file mode 100644
index 0000000..977869d
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-hdpi/logo_70.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/drawer_shadow.9.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..ffe3a28
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/drawer_shadow.9.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..353e064
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..5798c48
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_24dp.png
new file mode 100644
index 0000000..aa6d98e
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_down_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_down_24dp.png
new file mode 100644
index 0000000..9c4e8ad
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/ic_keyboard_capslock_black_down_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/logo_70.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/logo_70.png
new file mode 100644
index 0000000..f75d45c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-mdpi/logo_70.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..fabe9d9
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c571b2e
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..957087a
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_24dp.png
new file mode 100644
index 0000000..3e23246
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_down_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_down_24dp.png
new file mode 100644
index 0000000..0f81bfc
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/ic_keyboard_capslock_black_down_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/logo_70.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/logo_70.png
new file mode 100644
index 0000000..177a102
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xhdpi/logo_70.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..b91e9d7
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c41a5fc
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..727b403
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_24dp.png
new file mode 100644
index 0000000..72ad88c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_down_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_down_24dp.png
new file mode 100644
index 0000000..15bc238
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/ic_keyboard_capslock_black_down_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/logo_70.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/logo_70.png
new file mode 100644
index 0000000..59a0131
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxhdpi/logo_70.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..3a82cab
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..ea7b5fa
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_24dp.png
new file mode 100644
index 0000000..f85fcc7
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_down_24dp.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_down_24dp.png
new file mode 100644
index 0000000..d9a21e0
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/ic_keyboard_capslock_black_down_24dp.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/logo_70.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/logo_70.png
new file mode 100644
index 0000000..d225ebb
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable-xxxhdpi/logo_70.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable/first_run_bg.jpg b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable/first_run_bg.jpg
new file mode 100644
index 0000000..6b0cf17
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/drawable/first_run_bg.jpg differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout-sw600dp/fragment_main.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout-sw600dp/fragment_main.xml
new file mode 100644
index 0000000..36bb34f
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout-sw600dp/fragment_main.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_detail.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_detail.xml
new file mode 100644
index 0000000..b2d95c0
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_detail.xml
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_main.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..5eb084a
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_splash.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_splash.xml
new file mode 100644
index 0000000..29712da
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/activity_splash.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_a.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_a.xml
new file mode 100644
index 0000000..4cc9a49
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_a.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_b.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_b.xml
new file mode 100644
index 0000000..e767a2f
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_footer_b.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_a.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_a.xml
new file mode 100644
index 0000000..69391a0
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_a.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_b.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_b.xml
new file mode 100644
index 0000000..5371b72
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_detail_header_b.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main.xml
new file mode 100644
index 0000000..55caedb
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_a.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_a.xml
new file mode 100644
index 0000000..8057a13
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_a.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_b.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_b.xml
new file mode 100644
index 0000000..b4ff8f7
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_footer_b.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_a.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_a.xml
new file mode 100644
index 0000000..4af5469
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_a.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_b.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_b.xml
new file mode 100644
index 0000000..7116d05
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/fragment_main_header_b.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/list_item_info_a.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/list_item_info_a.xml
new file mode 100644
index 0000000..b25a40c
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/layout/list_item_info_a.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/menu/menu.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/menu/menu.xml
new file mode 100644
index 0000000..9a40b5e
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/menu/menu.xml
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-hdpi/ic_launcher.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-mdpi/ic_launcher.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values-sw600dp/dimens.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..9b03d3c
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,4 @@
+
+
+ 200dp
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/colors.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..c191035
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/colors.xml
@@ -0,0 +1,13 @@
+
+
+ #26C6DA
+ #00BCD4
+ #3F99A9
+ #FFF
+ #B3FFFFFF
+ #8a000000
+ #1E000000
+ #ADFF2F
+ #FF4500
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/dimens.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..4bc422e
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/dimens.xml
@@ -0,0 +1,13 @@
+
+
+ 32sp
+ 20sp
+ 70dp
+ 25dp
+ 16dp
+ 150dp
+ 15dp
+ -60dp
+ 75dp
+
+
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/strings.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..b3103f3
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/strings.xml
@@ -0,0 +1,22 @@
+
+ Match Template
+ Match the following App
+ ENTER
+ by
+ Anupam
+ About
+ PREVIOUS
+ About Us
+ This application has been developed using the BuildmLearn Toolkit.\n\nTo know more about BuildmLearn Toolkit visit here.
+ OK
+ Background Image
+ BuildmLearn Logo
+ Country-Capital Match
+ CHECK ANSWERS
+ TRY AGAIN
+ First List Up
+ First List Down
+ Second List Up
+ Separator
+ Second List Down
+
diff --git a/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/styles.xml b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..d3e3fd7
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/app/src/main/res/values/styles.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MatchTemplate/source/MatchTemplateApp/build.gradle b/MatchTemplate/source/MatchTemplateApp/build.gradle
new file mode 100644
index 0000000..aff4f41
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/build.gradle
@@ -0,0 +1,23 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.1.2'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/MatchTemplate/source/MatchTemplateApp/gradle.properties b/MatchTemplate/source/MatchTemplateApp/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.jar b/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.properties b/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..122a0dc
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
diff --git a/MatchTemplate/source/MatchTemplateApp/gradlew b/MatchTemplate/source/MatchTemplateApp/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/MatchTemplate/source/MatchTemplateApp/gradlew.bat b/MatchTemplate/source/MatchTemplateApp/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/MatchTemplate/source/MatchTemplateApp/settings.gradle b/MatchTemplate/source/MatchTemplateApp/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/MatchTemplate/source/MatchTemplateApp/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/QuizTemplate/apk/QuizTemplateApp_v3.0.apk b/QuizTemplate/apk/QuizTemplateApp_v3.0.apk
new file mode 100644
index 0000000..f068866
Binary files /dev/null and b/QuizTemplate/apk/QuizTemplateApp_v3.0.apk differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/.gitignore b/QuizTemplate/source/QuizTemplateAppV3/.gitignore
new file mode 100644
index 0000000..c6cbe56
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/.gitignore
@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/.gitignore b/QuizTemplate/source/QuizTemplateAppV3/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/build.gradle b/QuizTemplate/source/QuizTemplateAppV3/app/build.gradle
new file mode 100644
index 0000000..8218946
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/build.gradle
@@ -0,0 +1,29 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "23.0.2"
+
+ defaultConfig {
+ applicationId "org.buildmlearn.quiztime"
+ minSdkVersion 15
+ targetSdkVersion 23
+ versionCode 3
+ versionName "3.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ }
+}
+
+dependencies {
+ compile 'com.android.support:appcompat-v7:23.4.0'
+ compile 'com.android.support:design:23.4.0'
+ compile 'com.android.support:cardview-v7:23.4.0'
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/proguard-rules.pro b/QuizTemplate/source/QuizTemplateAppV3/app/proguard-rules.pro
new file mode 100644
index 0000000..2fecd43
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /home/anupam/Android/Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/AndroidManifest.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..de5bbc8
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/AndroidManifest.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/assets/quiz_content.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/assets/quiz_content.xml
new file mode 100644
index 0000000..c941aa2
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/assets/quiz_content.xml
@@ -0,0 +1,47 @@
+
+
+ Neha Dhanwani
+ dhanwanineha@gmail.com
+
+ Environmental Science Quiz
+
+ 1
+
+ -
+ Could acid rain be considered to have a...
+
+
+
+
+ 2
+
+ -
+ Why are some pollutants only acting locally?
+
+
+
+ 2
+
+ -
+ Which was the first National Park in the world?
+
+
+
+ 1
+
+ -
+ What is an ecological footprint?
+
+
+
+ 2
+
+ -
+ Is reindeer herding a sustainable strategy?
+
+
+
+ 1
+
+
+
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/Constants.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/Constants.java
new file mode 100644
index 0000000..c427eff
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/Constants.java
@@ -0,0 +1,21 @@
+package org.buildmlearn.quiztime;
+
+/**
+ * @brief Constants used in quiz template's app relating databases.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class Constants {
+ public static final String XMLFileName = "quiz_content.xml";
+ public static final String firstrun = "firstRun";
+
+ public static final int COL_QUESTION = 1;
+ public static final int COL_OPTION_1 = 2;
+ public static final int COL_OPTION_2 = 3;
+ public static final int COL_OPTION_3 = 4;
+ public static final int COL_OPTION_4 = 5;
+ public static final int COL_CORRECT_ANSWER = 6;
+ public static final int COL_ANSWERED = 7;
+ public static final int COL_ATTEMPTED = 8;
+
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/LastActivity.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/LastActivity.java
new file mode 100644
index 0000000..8a5b8e2
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/LastActivity.java
@@ -0,0 +1,108 @@
+package org.buildmlearn.quiztime.activities;
+
+import android.app.Activity;
+import android.app.FragmentManager;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.text.method.LinkMovementMethod;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.TextView;
+
+import org.buildmlearn.quiztime.R;
+import org.buildmlearn.quiztime.data.QuizDb;
+
+import java.util.Locale;
+
+/**
+ * @brief Activity for displaying score to user in quiz template app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class LastActivity extends AppCompatActivity {
+
+ private QuizDb db;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_last);
+
+ final Activity activity = this;
+
+ db = new QuizDb(this);
+ db.open();
+
+ int stat[] = db.getStatistics();
+
+ assert ((TextView) findViewById(R.id.correct)) != null;
+ ((TextView) findViewById(R.id.correct)).setText(String.format(Locale.getDefault(), "Total Correct : %1$d", stat[0]));
+ assert ((TextView) findViewById(R.id.wrong)) != null;
+ ((TextView) findViewById(R.id.wrong)).setText(String.format(Locale.getDefault(), "Total Wrong : %1$d", stat[1]));
+ assert ((TextView) findViewById(R.id.un_answered)) != null;
+ ((TextView) findViewById(R.id.un_answered)).setText(String.format(Locale.getDefault(), "Total Unanswered : %1$d", stat[2]));
+
+ findViewById(R.id.restart).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ db.resetCount();
+ getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
+ Intent intent = new Intent(activity, QuestionActivity.class)
+ .setType("text/plain")
+ .putExtra(Intent.EXTRA_TEXT, "1")
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(intent);
+ finish();
+ }
+ });
+
+ findViewById(R.id.exit).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_HOME);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+ });
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem menuItem) {
+ switch (menuItem.getItemId()) {
+
+ case R.id.action_about:
+ AlertDialog.Builder builder =
+ new AlertDialog.Builder(this);
+ builder.setTitle(String.format("%1$s", getString(R.string.about_us)));
+ builder.setMessage(getResources().getText(R.string.about_text));
+ builder.setPositiveButton(getString(R.string.ok), null);
+ AlertDialog welcomeAlert = builder.create();
+ welcomeAlert.show();
+ assert ((TextView) welcomeAlert.findViewById(android.R.id.message)) != null;
+ ((TextView) welcomeAlert.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
+
+ break;
+ default: //do nothing
+ break;
+ }
+ return (super.onOptionsItemSelected(menuItem));
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ db.close();
+ }
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/QuestionActivity.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/QuestionActivity.java
new file mode 100644
index 0000000..4027f2c
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/QuestionActivity.java
@@ -0,0 +1,269 @@
+package org.buildmlearn.quiztime.activities;
+
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.support.design.widget.NavigationView;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.text.method.LinkMovementMethod;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.SubMenu;
+import android.view.View;
+import android.widget.RadioGroup;
+import android.widget.TextView;
+
+import org.buildmlearn.quiztime.Constants;
+import org.buildmlearn.quiztime.R;
+import org.buildmlearn.quiztime.data.QuizDb;
+
+import java.util.Locale;
+
+/**
+ * @brief Question Activity for quiz template app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class QuestionActivity extends AppCompatActivity
+ implements NavigationView.OnNavigationItemSelectedListener {
+
+ private QuizDb db;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_question);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
+ this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+ assert drawer != null;
+ drawer.addDrawerListener(toggle);
+ toggle.syncState();
+
+ NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
+ assert navigationView != null;
+ navigationView.setNavigationItemSelectedListener(this);
+
+ Bundle extras = getIntent().getExtras();
+ String questionId = null;
+ if (extras != null) {
+ questionId = extras.getString(Intent.EXTRA_TEXT);
+ }
+
+ db = new QuizDb(this);
+ db.open();
+ Cursor cursor = db.getQuestionCursorById(Integer.parseInt(questionId));
+ cursor.moveToFirst();
+ String question = cursor.getString(Constants.COL_QUESTION);
+ String option_1 = cursor.getString(Constants.COL_OPTION_1);
+ String option_2 = cursor.getString(Constants.COL_OPTION_2);
+ String option_3 = cursor.getString(Constants.COL_OPTION_3);
+ String option_4 = cursor.getString(Constants.COL_OPTION_4);
+ int attempted = cursor.getInt(Constants.COL_ATTEMPTED);
+ String answered;
+
+ getSupportActionBar().setTitle(getString(R.string.app_name));
+
+ Menu m = navigationView.getMenu();
+ SubMenu topChannelMenu = m.addSubMenu("Questions");
+ long numQues = db.getCountQuestions();
+
+ final String finalQuestionId = questionId;
+
+ final RadioGroup rg = (RadioGroup) findViewById(R.id.radio_group);
+
+ if (attempted == 1) {
+ answered = cursor.getString(Constants.COL_ANSWERED);
+ assert rg != null;
+ rg.check(rg.getChildAt(Integer.parseInt(answered)).getId());
+ }
+ for (int i = 1; i <= numQues; i++) {
+ topChannelMenu.add(String.format(Locale.getDefault(), "Question %1$d", i));
+ topChannelMenu.getItem(i - 1).setIcon(R.drawable.ic_assignment_black_24dp);
+ final int finalI = i;
+ topChannelMenu.getItem(i - 1).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ assert rg != null;
+ int radioButtonID = rg.getCheckedRadioButtonId();
+ View radioButton = rg.findViewById(radioButtonID);
+ int idx = rg.indexOfChild(radioButton);
+
+
+ if (idx == -1) {
+ db.markUnAnswered(Integer.parseInt(finalQuestionId));
+ } else {
+ db.markAnswered(Integer.parseInt(finalQuestionId), idx);
+ }
+
+ Intent intent = new Intent(getApplicationContext(), QuestionActivity.class)
+ .setType("text/plain")
+ .putExtra(Intent.EXTRA_TEXT, String.valueOf(finalI));
+ startActivity(intent);
+ finish();
+
+ return false;
+ }
+ });
+ }
+
+ assert ((TextView) findViewById(R.id.question_title)) != null;
+ ((TextView) findViewById(R.id.question_title)).setText(String.format(Locale.getDefault(), "Question No : %1$s", questionId));
+ assert ((TextView) findViewById(R.id.question)) != null;
+ ((TextView) findViewById(R.id.question)).setText(question);
+ if (option_1 != null) {
+ findViewById(R.id.radioButton1).setVisibility(View.VISIBLE);
+ assert ((TextView) findViewById(R.id.radioButton1)) != null;
+ ((TextView) findViewById(R.id.radioButton1)).setText(option_1);
+ }
+ if (option_2 != null) {
+ findViewById(R.id.radioButton2).setVisibility(View.VISIBLE);
+ assert ((TextView) findViewById(R.id.radioButton2)) != null;
+ ((TextView) findViewById(R.id.radioButton2)).setText(option_2);
+ }
+ if (option_3 != null) {
+ findViewById(R.id.radioButton3).setVisibility(View.VISIBLE);
+ assert ((TextView) findViewById(R.id.radioButton3)) != null;
+ ((TextView) findViewById(R.id.radioButton3)).setText(option_3);
+ }
+ if (option_4 != null) {
+ findViewById(R.id.radioButton4).setVisibility(View.VISIBLE);
+ assert ((TextView) findViewById(R.id.radioButton4)) != null;
+ ((TextView) findViewById(R.id.radioButton4)).setText(option_4);
+ }
+
+ findViewById(R.id.next).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ assert rg != null;
+ int radioButtonID = rg.getCheckedRadioButtonId();
+ View radioButton = rg.findViewById(radioButtonID);
+ int idx = rg.indexOfChild(radioButton);
+
+ if (idx == -1) {
+ db.markUnAnswered(Integer.parseInt(finalQuestionId));
+ } else {
+ db.markAnswered(Integer.parseInt(finalQuestionId), idx);
+ }
+
+ long numColumns = db.getCountQuestions();
+
+ long nextQuesId = Integer.parseInt(finalQuestionId) + 1;
+
+ if (nextQuesId <= numColumns) {
+
+ Intent intent = new Intent(getApplicationContext(), QuestionActivity.class)
+ .setType("text/plain")
+ .putExtra(Intent.EXTRA_TEXT, String.valueOf(nextQuesId));
+ startActivity(intent);
+ finish();
+
+ } else {
+
+ Intent intent = new Intent(getApplicationContext(), LastActivity.class)
+ .setType("text/plain");
+ startActivity(intent);
+ finish();
+ }
+
+ }
+ });
+
+ if (Integer.parseInt(questionId) == 1) {
+
+ findViewById(R.id.previous).setVisibility(View.INVISIBLE);
+
+ } else {
+
+ findViewById(R.id.previous).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ assert rg != null;
+ int radioButtonID = rg.getCheckedRadioButtonId();
+ View radioButton = rg.findViewById(radioButtonID);
+ int idx = rg.indexOfChild(radioButton);
+
+ if (idx == -1) {
+ db.markUnAnswered(Integer.parseInt(finalQuestionId));
+ } else {
+ db.markAnswered(Integer.parseInt(finalQuestionId), idx);
+ }
+
+ int prevQuesId = Integer.parseInt(finalQuestionId) - 1;
+
+ if (prevQuesId >= 1) {
+ Intent intent = new Intent(getApplicationContext(), QuestionActivity.class)
+ .setType("text/plain")
+ .putExtra(Intent.EXTRA_TEXT, String.valueOf(prevQuesId));
+ startActivity(intent);
+ }
+ }
+ });
+ }
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem menuItem) {
+ switch (menuItem.getItemId()) {
+
+ case R.id.action_about:
+ AlertDialog.Builder builder =
+ new AlertDialog.Builder(this);
+ builder.setTitle(String.format("%1$s", getString(R.string.about_us)));
+ builder.setMessage(getResources().getText(R.string.about_text));
+ builder.setPositiveButton(getString(R.string.ok), null);
+ AlertDialog welcomeAlert = builder.create();
+ welcomeAlert.show();
+ assert ((TextView) welcomeAlert.findViewById(android.R.id.message)) != null;
+ ((TextView) welcomeAlert.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
+
+ break;
+ default: //do nothing
+ break;
+ }
+ return (super.onOptionsItemSelected(menuItem));
+ }
+
+ @Override
+ public void onBackPressed() {
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ assert drawer != null;
+ if (drawer.isDrawerOpen(GravityCompat.START)) {
+ drawer.closeDrawer(GravityCompat.START);
+ } else {
+ super.onBackPressed();
+ }
+ }
+
+ @Override
+ public boolean onNavigationItemSelected(MenuItem item) {
+
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ assert drawer != null;
+ drawer.closeDrawer(GravityCompat.START);
+ return true;
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ db.close();
+ }
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/SplashActivity.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/SplashActivity.java
new file mode 100644
index 0000000..ed581ea
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/activities/SplashActivity.java
@@ -0,0 +1,75 @@
+package org.buildmlearn.quiztime.activities;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.TextView;
+
+import org.buildmlearn.quiztime.Constants;
+import org.buildmlearn.quiztime.R;
+import org.buildmlearn.quiztime.data.DataUtils;
+import org.buildmlearn.quiztime.data.FetchXMLTask;
+import org.buildmlearn.quiztime.data.QuizDb;
+
+/**
+ * @brief Splash intro Activity for quiz template app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class SplashActivity extends Activity {
+
+ private SharedPreferences prefs = null;
+ private QuizDb db;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ final Activity mActivity = this;
+ setContentView(R.layout.activity_splash);
+
+ final String result[] = DataUtils.readTitleAuthor(this);
+ TextView title = (TextView) findViewById(R.id.title);
+ TextView author_name = (TextView) findViewById(R.id.author_name);
+
+ title.setText(result[0]);
+ author_name.setText(result[1]);
+
+ findViewById(R.id.enter).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ Intent intent = new Intent(mActivity, QuestionActivity.class)
+ .setType("text/plain")
+ .putExtra(Intent.EXTRA_TEXT, "1");
+
+ startActivity(intent);
+ finish();
+ }
+ });
+
+ prefs = getSharedPreferences(Constants.firstrun, MODE_PRIVATE);
+
+ db = new QuizDb(this);
+ db.open();
+ db.resetCount();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+ if (prefs.getBoolean(Constants.firstrun, true)) {
+ FetchXMLTask xmlTask = new FetchXMLTask(this);
+ xmlTask.execute(Constants.XMLFileName);
+ prefs.edit().putBoolean(Constants.firstrun, false).apply();
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ db.close();
+ }
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/DataUtils.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/DataUtils.java
new file mode 100644
index 0000000..f351951
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/DataUtils.java
@@ -0,0 +1,46 @@
+package org.buildmlearn.quiztime.data;
+
+import android.content.Context;
+
+import org.buildmlearn.quiztime.Constants;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+/**
+ * @brief Contains xml data utils for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class DataUtils {
+
+ public static String[] readTitleAuthor(Context myContext) {
+ String result[] = new String[2];
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+
+ dbf.setValidating(false);
+
+ DocumentBuilder db;
+ Document doc;
+ try {
+ db = dbf.newDocumentBuilder();
+ doc = db.parse(myContext.getAssets().open(Constants.XMLFileName));
+ doc.normalize();
+
+ result[0] = doc.getElementsByTagName("title").item(0).getChildNodes()
+ .item(0).getNodeValue();
+
+ result[1] = doc.getElementsByTagName("name").item(0).getChildNodes()
+ .item(0).getNodeValue();
+
+ } catch (ParserConfigurationException | SAXException | IOException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/FetchXMLTask.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/FetchXMLTask.java
new file mode 100644
index 0000000..b316bc7
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/FetchXMLTask.java
@@ -0,0 +1,155 @@
+package org.buildmlearn.quiztime.data;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.os.AsyncTask;
+
+import org.buildmlearn.quiztime.data.QuizContract.Questions;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Vector;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+/**
+ * @brief Used to parse XML and save in database for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class FetchXMLTask extends AsyncTask {
+
+ private final Context mContext;
+
+ public FetchXMLTask(Context context) {
+ mContext = context;
+ }
+
+ private static String getValue(String tag, Element element) {
+ NodeList nodeList = null;
+ NodeList node1 = element.getElementsByTagName(tag);
+ if (node1 != null && node1.getLength() != 0)
+ nodeList = node1.item(0).getChildNodes();
+ if (nodeList == null)
+ return "";
+ else if (nodeList.getLength() == 0)
+ return "";
+ else {
+ Node node = nodeList.item(0);
+ return node.getNodeValue();
+ }
+ }
+
+ private void saveQuestions(ArrayList questions) {
+
+ Vector cVVector = new Vector<>(questions.size());
+
+ for (int i = 0; i < questions.size(); i++) {
+
+ String question;
+ ArrayList options;
+ int correctAnswer;
+
+ QuizModel questionInfo = questions.get(i);
+
+ question = questionInfo.getQuestion();
+ options = questionInfo.getOptions();
+ correctAnswer = questionInfo.getCorrectAnswer();
+
+ ContentValues quesValues = new ContentValues();
+
+ quesValues.put(Questions.QUESTION, question);
+ if (options.size() >= 1) {
+ quesValues.put(Questions.OPTION_1, options.get(0));
+ }
+ if (options.size() >= 2) {
+ quesValues.put(Questions.OPTION_2, options.get(1));
+ }
+ if (options.size() >= 3) {
+ quesValues.put(Questions.OPTION_3, options.get(2));
+ }
+ if (options.size() >= 4) {
+ quesValues.put(Questions.OPTION_4, options.get(3));
+ }
+ quesValues.put(Questions.CORRECT_ANSWER, correctAnswer);
+ quesValues.put(Questions.ATTEMPTED, 0);
+
+ cVVector.add(quesValues);
+ }
+ // add to database
+ if (cVVector.size() > 0) {
+ ContentValues[] cvArray = new ContentValues[cVVector.size()];
+ cVVector.toArray(cvArray);
+ QuizDb db = new QuizDb(mContext);
+ db.open();
+ db.bulkInsertQuestions(cvArray);
+ db.close();
+ }
+ }
+
+ @Override
+ protected Void doInBackground(String... params) {
+
+ if (params.length == 0) {
+ return null;
+ }
+ String fileName = params[0];
+ ArrayList mList;
+ ArrayList mOptions;
+
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+
+ dbf.setValidating(false);
+
+ DocumentBuilder db;
+ Document doc;
+ try {
+ mList = new ArrayList<>();
+ db = dbf.newDocumentBuilder();
+ doc = db.parse(mContext.getAssets().open(fileName));
+ doc.normalize();
+
+ NodeList childNodes = doc.getElementsByTagName("item");
+
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ QuizModel app = new QuizModel();
+
+ Node child = childNodes.item(i);
+
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Element element2 = (Element) child;
+
+ app.setQuestion(getValue("question", element2));
+ mOptions = new ArrayList<>();
+ NodeList optionNodes = element2
+ .getElementsByTagName("option");
+ for (int j = 0; j < optionNodes.getLength(); j++) {
+ mOptions.add(optionNodes.item(j).getChildNodes().item(0).getNodeValue());
+ }
+ app.setCorrectAnswer(Integer.parseInt(getValue("answer", element2)));
+ app.setOptions(mOptions);
+ }
+ mList.add(app);
+ }
+ saveQuestions(mList);
+ } catch (ParserConfigurationException e) {
+ return null;
+ } catch (FileNotFoundException e) {
+ return null;
+ } catch (SAXException e) {
+ return null;
+ } catch (IOException e) {
+ return null;
+ }
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizContract.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizContract.java
new file mode 100644
index 0000000..63fbf05
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizContract.java
@@ -0,0 +1,27 @@
+package org.buildmlearn.quiztime.data;
+
+import android.provider.BaseColumns;
+
+/**
+ * @brief Contains database contracts for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+
+class QuizContract {
+
+ public static final class Questions implements BaseColumns {
+
+ public static final String TABLE_NAME = "questions";
+
+ public static final String QUESTION = "question";
+ public static final String OPTION_1 = "option_1";
+ public static final String OPTION_2 = "option_2";
+ public static final String OPTION_3 = "option_3";
+ public static final String OPTION_4 = "option_4";
+ public static final String CORRECT_ANSWER = "correct_answer";
+ public static final String ANSWERED = "answered";
+ public static final String ATTEMPTED = "attempted";
+
+ }
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDBHelper.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDBHelper.java
new file mode 100644
index 0000000..9b1af5b
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDBHelper.java
@@ -0,0 +1,45 @@
+package org.buildmlearn.quiztime.data;
+
+import android.content.Context;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+
+import org.buildmlearn.quiztime.data.QuizContract.Questions;
+
+/**
+ * @brief DatabaseHelper for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+
+class QuizDBHelper extends SQLiteOpenHelper {
+
+ private static final String DATABASE_NAME = "quiz.db";
+ private static final int DATABASE_VERSION = 1;
+
+ public QuizDBHelper(Context context) {
+ super(context, DATABASE_NAME, null, DATABASE_VERSION);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase sqLiteDatabase) {
+ final String SQL_CREATE__TABLE_A = "CREATE TABLE " + Questions.TABLE_NAME + " (" +
+ Questions._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
+ Questions.QUESTION + " TEXT," +
+ Questions.OPTION_1 + " TEXT," +
+ Questions.OPTION_2 + " TEXT," +
+ Questions.OPTION_3 + " TEXT," +
+ Questions.OPTION_4 + " TEXT," +
+ Questions.CORRECT_ANSWER + " INTEGER," +
+ Questions.ANSWERED + " INTEGER," +
+ Questions.ATTEMPTED + " INTEGER )";
+
+ sqLiteDatabase.execSQL(SQL_CREATE__TABLE_A);
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) {
+ sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + Questions.TABLE_NAME);
+ onCreate(sqLiteDatabase);
+ }
+}
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDb.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDb.java
new file mode 100644
index 0000000..9a67740
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizDb.java
@@ -0,0 +1,135 @@
+package org.buildmlearn.quiztime.data;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.DatabaseUtils;
+import android.database.SQLException;
+import android.database.sqlite.SQLiteDatabase;
+import android.support.annotation.NonNull;
+
+import org.buildmlearn.quiztime.Constants;
+import org.buildmlearn.quiztime.data.QuizContract.Questions;
+
+import java.util.Arrays;
+
+/**
+ * @brief Contains database util functions for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class QuizDb {
+
+ private static final String EQUAL = " == ";
+ private final QuizDBHelper dbHelper;
+ private SQLiteDatabase db;
+
+ public QuizDb(Context context) {
+ dbHelper = new QuizDBHelper(context);
+ }
+
+ public void open() throws SQLException {
+ db = dbHelper.getWritableDatabase();
+ }
+
+ public boolean isOpen() {
+ return db.isOpen();
+ }
+
+ public void close() {
+ dbHelper.close();
+ }
+
+ public void markAnswered(int id, int answer) {
+
+ ContentValues values = new ContentValues();
+ values.put(Questions.ANSWERED, answer);
+ values.put(Questions.ATTEMPTED, 1);
+
+ db.update(Questions.TABLE_NAME, values, Questions._ID + " = ?",
+ new String[]{String.valueOf(id)});
+
+ }
+
+ public void markUnAnswered(int id) {
+
+ ContentValues values = new ContentValues();
+ values.put(Questions.ANSWERED, "");
+ values.put(Questions.ATTEMPTED, 0);
+
+ db.update(Questions.TABLE_NAME, values, Questions._ID + " = ?",
+ new String[]{String.valueOf(id)});
+
+ }
+
+ public void resetCount() {
+ for (int i = 1; i <= getCountQuestions(); i++) {
+ markUnAnswered(i);
+ }
+ }
+
+ public int[] getStatistics() {
+ int stat[] = new int[3];
+ Arrays.fill(stat, 0);
+
+ for (int i = 1; i <= getCountQuestions(); i++) {
+ Cursor cursor = getQuestionCursorById(i);
+ cursor.moveToFirst();
+
+ String correct_answer = cursor.getString(Constants.COL_CORRECT_ANSWER);
+ int attempted = cursor.getInt(Constants.COL_ATTEMPTED);
+ if (attempted == 1) {
+ String answer = cursor.getString(Constants.COL_ANSWERED);
+ if (answer.equals(correct_answer)) {
+ stat[0]++;
+ } else {
+ stat[1]++;
+ }
+ } else {
+ stat[2]++;
+ }
+ }
+ return stat;
+ }
+
+ public Cursor getQuestionCursorById(int id) {
+
+ String selection = Questions._ID + EQUAL + id;
+
+ return db.query(
+ Questions.TABLE_NAME,
+ null,
+ selection,
+ null,
+ null,
+ null,
+ null
+ );
+ }
+
+ public long getCountQuestions() {
+
+ return DatabaseUtils.queryNumEntries(db,
+ Questions.TABLE_NAME);
+ }
+
+ public int bulkInsertQuestions(@NonNull ContentValues[] values) {
+
+ db.beginTransaction();
+ int returnCount = 0;
+ try {
+ for (ContentValues value : values) {
+
+ long _id = db.insert(Questions.TABLE_NAME, null, value);
+ if (_id != -1) {
+ returnCount++;
+ }
+ }
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+ return returnCount;
+ }
+
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizModel.java b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizModel.java
new file mode 100644
index 0000000..276b2bf
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/java/org/buildmlearn/quiztime/data/QuizModel.java
@@ -0,0 +1,75 @@
+package org.buildmlearn.quiztime.data;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+
+/**
+ * @brief Model used to save quiz entries in database for quiz template's app.
+ *
+ * Created by Anupam (opticod) on 11/8/16.
+ */
+public class QuizModel implements Parcelable {
+ public final Parcelable.Creator CREATOR = new Parcelable.Creator() {
+ @Override
+ public QuizModel createFromParcel(Parcel parcel) {
+ return new QuizModel(parcel);
+ }
+
+ @Override
+ public QuizModel[] newArray(int size) {
+ return new QuizModel[size];
+ }
+ };
+ private String question;
+ private ArrayList options;
+ private int correctAnswer;
+
+ private QuizModel(Parcel in) {
+ this.question = in.readString();
+ this.options = in.createStringArrayList();
+ this.correctAnswer = in.readInt();
+ }
+
+ public QuizModel() {
+
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(question);
+ dest.writeStringList(options);
+ dest.writeInt(correctAnswer);
+ }
+
+ public String getQuestion() {
+ return question;
+ }
+
+ public void setQuestion(String question) {
+ this.question = question;
+ }
+
+ public ArrayList getOptions() {
+ return options;
+ }
+
+ public void setOptions(ArrayList options) {
+ this.options = options;
+ }
+
+ public int getCorrectAnswer() {
+ return correctAnswer;
+ }
+
+ public void setCorrectAnswer(int correctAnswer) {
+ this.correctAnswer = correctAnswer;
+ }
+
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_assignment_black_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_assignment_black_24dp.png
new file mode 100644
index 0000000..da63e58
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_assignment_black_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c7b1113
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..a74bd8c
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_input_white_48dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_launcher.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..4ed123a
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/ic_launcher.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/logo_70.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/logo_70.png
new file mode 100644
index 0000000..977869d
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-hdpi/logo_70.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_assignment_black_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_assignment_black_24dp.png
new file mode 100644
index 0000000..705cea3
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_assignment_black_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..353e064
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..5798c48
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_input_white_48dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_launcher.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..1e0cefc
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/ic_launcher.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/logo_70.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/logo_70.png
new file mode 100644
index 0000000..f75d45c
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-mdpi/logo_70.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_assignment_black_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_assignment_black_24dp.png
new file mode 100644
index 0000000..0c837b2
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_assignment_black_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c571b2e
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..957087a
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_input_white_48dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_launcher.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..ef75bc6
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/logo_70.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/logo_70.png
new file mode 100644
index 0000000..177a102
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xhdpi/logo_70.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_assignment_black_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_assignment_black_24dp.png
new file mode 100644
index 0000000..9084205
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_assignment_black_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..c41a5fc
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..727b403
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_input_white_48dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..dd1f759
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/logo_70.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/logo_70.png
new file mode 100644
index 0000000..59a0131
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxhdpi/logo_70.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_assignment_black_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_assignment_black_24dp.png
new file mode 100644
index 0000000..ae93203
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_assignment_black_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png
new file mode 100644
index 0000000..3a82cab
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png
new file mode 100755
index 0000000..ea7b5fa
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_input_white_48dp.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_launcher.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..1dfd8f6
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/ic_launcher.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/logo_70.png b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/logo_70.png
new file mode 100644
index 0000000..d225ebb
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable-xxxhdpi/logo_70.png differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/first_run_bg.jpg b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/first_run_bg.jpg
new file mode 100644
index 0000000..6b0cf17
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/first_run_bg.jpg differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/side_nav_bar.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/side_nav_bar.xml
new file mode 100644
index 0000000..ebe6ca8
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/drawable/side_nav_bar.xml
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_last.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_last.xml
new file mode 100644
index 0000000..142fc3a
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_last.xml
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_splash.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_splash.xml
new file mode 100644
index 0000000..b2e9171
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/activity_splash.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/app_bar_question.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/app_bar_question.xml
new file mode 100644
index 0000000..447303d
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/app_bar_question.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/content_question.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/content_question.xml
new file mode 100644
index 0000000..dfe4e66
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/content_question.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/nav_header_main.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/nav_header_main.xml
new file mode 100644
index 0000000..2039ab2
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout-sw600dp/nav_header_main.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_last.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_last.xml
new file mode 100644
index 0000000..32b5641
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_last.xml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_question.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_question.xml
new file mode 100644
index 0000000..8ac7754
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_question.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_splash.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_splash.xml
new file mode 100644
index 0000000..29712da
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/activity_splash.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/app_bar_question.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/app_bar_question.xml
new file mode 100644
index 0000000..f71fcd3
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/app_bar_question.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/content_question.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/content_question.xml
new file mode 100644
index 0000000..5e0b5bd
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/content_question.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/nav_header_main.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/nav_header_main.xml
new file mode 100644
index 0000000..2039ab2
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/layout/nav_header_main.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/menu/menu_main.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..447b3d2
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/menu/menu_main.xml
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-v21/styles.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..dbbdd40
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-w820dp/dimens.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/colors.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..fd2ebeb
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/colors.xml
@@ -0,0 +1,9 @@
+
+
+ #26C6DA
+ #00BCD4
+ #3F99A9
+ #FFF
+ #B3FFFFFF
+ #8a000000
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/dimens.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..a3a0045
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/dimens.xml
@@ -0,0 +1,24 @@
+
+
+
+ 16dp
+ 160dp
+
+ 16dp
+ 16dp
+
+ 32sp
+ 20sp
+ 32dp
+ 50dp
+ 80dp
+ 25dp
+ 16dp
+ 350dp
+ 150dp
+ 15dp
+ -60dp
+ 150dp
+ 200dp
+
+
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/strings.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..9cd2e52
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/strings.xml
@@ -0,0 +1,23 @@
+
+
+ Open navigation drawer
+ Close navigation drawer
+
+ Quiz Time
+ Quiz Time
+ Environmental Science Quiz
+ ENTER
+ by
+ Anupam
+ About
+ PREVIOUS
+ NEXT
+ EXIT
+ RESTART
+ About Us
+ This application has been developed using the BuildmLearn Toolkit.\n\nTo know more about BuildmLearn Toolkit visit here.
+ OK
+ Background Image
+ BuildmLearn Logo
+ Hurrah! You have completed the Quiz.
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/styles.xml b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..59a8d79
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/app/src/main/res/values/styles.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QuizTemplate/source/QuizTemplateAppV3/build.gradle b/QuizTemplate/source/QuizTemplateAppV3/build.gradle
new file mode 100644
index 0000000..aff4f41
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/build.gradle
@@ -0,0 +1,23 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.1.2'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/QuizTemplate/source/QuizTemplateAppV3/gradle.properties b/QuizTemplate/source/QuizTemplateAppV3/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.jar b/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.properties b/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..122a0dc
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
diff --git a/QuizTemplate/source/QuizTemplateAppV3/gradlew b/QuizTemplate/source/QuizTemplateAppV3/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/QuizTemplate/source/QuizTemplateAppV3/gradlew.bat b/QuizTemplate/source/QuizTemplateAppV3/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/QuizTemplate/source/QuizTemplateAppV3/settings.gradle b/QuizTemplate/source/QuizTemplateAppV3/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/QuizTemplate/source/QuizTemplateAppV3/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/README.md b/README.md
index a1704e9..56903d6 100644
--- a/README.md
+++ b/README.md
@@ -16,9 +16,11 @@ Glosarry
| Folders | Description |
| ------------- |:-------------|
| ComprehensionTemplate | Contains apk and source-code of Comprehension Template app |
+| DictationTemplate | Contains apk and source-code of Dictation Template app |
| FlashCardTemplate | Contains apk and source-code of FlashCard Template app |
| InfoTemplate | Contains apk and source-code of Info Template app |
| LearnSpellingsTemplate | Contains apk and source-code of Learn Spellings Template app |
+| MatchTemplate | Contains apk and source-code of Match Template app |
| QuizTemplate | Contains apk and source-code of Quiz Template app |
| VideoCollectionTemplate | Contains apk and source-code of Video Collection Template app |
| ui-design | Contains UI mockups and wireframes |
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/Constants.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/Constants.java
index 31fb803..cfb61f5 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/Constants.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/Constants.java
@@ -3,6 +3,8 @@
import org.buildmlearn.videocollection.data.VideoContract;
/**
+ * @brief Constants used in video collection template's app relating databases.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
public class Constants {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/NetworkUtils.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/NetworkUtils.java
index a47ae46..1d9bd44 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/NetworkUtils.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/NetworkUtils.java
@@ -5,6 +5,8 @@
import android.net.NetworkInfo;
/**
+ * @brief Util to check network connection in video collection template's app.
+ *
* Created by Anupam(opticod) on 17/5/16.
*/
public class NetworkUtils {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/adapter/VideoArrayAdapter.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/adapter/VideoArrayAdapter.java
index a1f4b98..c1a8dce 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/adapter/VideoArrayAdapter.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/adapter/VideoArrayAdapter.java
@@ -18,6 +18,8 @@
import org.buildmlearn.videocollection.RoundedTransformation;
/**
+ * @brief Adapter for displaying VideoCollection Template Editor data in app.
+ *
* Created by Anupam (opticod) on 12/5/16.
*/
public class VideoArrayAdapter extends CursorAdapter {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/DataUtils.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/DataUtils.java
index 009e6a8..69798ca 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/DataUtils.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/DataUtils.java
@@ -13,6 +13,8 @@
import javax.xml.parsers.ParserConfigurationException;
/**
+ * @brief Contains xml data utils for video collection template's app.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
public class DataUtils {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/FetchXMLTask.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/FetchXMLTask.java
index 40707b4..6d527f5 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/FetchXMLTask.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/FetchXMLTask.java
@@ -20,6 +20,8 @@
import javax.xml.parsers.ParserConfigurationException;
/**
+ * @brief Used to parse XML and save in database for video collection template's app.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
public class FetchXMLTask extends AsyncTask {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoContract.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoContract.java
index af6c312..740b193 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoContract.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoContract.java
@@ -3,6 +3,8 @@
import android.provider.BaseColumns;
/**
+ * @brief Contains database contracts for video collection template's app.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDBHelper.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDBHelper.java
index 141e74f..91715cd 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDBHelper.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDBHelper.java
@@ -7,6 +7,8 @@
import org.buildmlearn.videocollection.data.VideoContract.Videos;
/**
+ * @brief DatabaseHelper for video collection template's app.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDb.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDb.java
index eec5f1d..03a9df0 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDb.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoDb.java
@@ -9,6 +9,8 @@
import android.support.annotation.NonNull;
/**
+ * @brief Contains database util functions for video collection template's app.
+ *
* Created by Anupam (opticod) on 19/5/16.
*/
public class VideoDb {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoModel.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoModel.java
index 3526972..42b5945 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoModel.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/data/VideoModel.java
@@ -4,6 +4,8 @@
import android.os.Parcelable;
/**
+ * @brief Model used to save video entries in database for video collection template's simulator.
+ *
* Created by Anupam (opticod) on 12/5/16.
*/
public class VideoModel implements Parcelable {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/DetailActivityFragment.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/DetailActivityFragment.java
index c3f11f1..1e97f7f 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/DetailActivityFragment.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/DetailActivityFragment.java
@@ -25,6 +25,8 @@
import org.buildmlearn.videocollection.data.VideoDb;
/**
+ * @brief Fragment containing details of video items in video collection template's app.
+ *
* Created by Anupam (opticod) on 13/5/16.
*/
public class DetailActivityFragment extends Fragment implements LoaderCallbacks {
diff --git a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/MainActivityFragment.java b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/MainActivityFragment.java
index 41d4080..261e07f 100644
--- a/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/MainActivityFragment.java
+++ b/VideoCollectionTemplate/source/VideoCollectionTemplateApp/app/src/main/java/org/buildmlearn/videocollection/fragment/MainActivityFragment.java
@@ -28,6 +28,8 @@
import java.util.ArrayList;
/**
+ * @brief Fragment containing list of videos in video collection template's app.
+ *
* Created by Anupam (opticod) on 12/5/16.
*/
public class MainActivityFragment extends Fragment implements LoaderManager.LoaderCallbacks {