// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/videocollectiontemplate/Constants.java
// public class Constants {
//     public static final String[] VIDEO_COLUMNS = {
//             VideoContract.Videos.TABLE_NAME + "." + VideoContract.Videos._ID,
//             VideoContract.Videos.TITLE,
//             VideoContract.Videos.DESCRIPTION,
//             VideoContract.Videos.LINK,
//             VideoContract.Videos.THUMBNAIL_URL
//     };
//     public static final int COL_TITLE = 1;
//     public static final int COL_DESCRIPTION = 2;
//     public static final int COL_LINK = 3;
//     public static final int COL_THUMBNAIL_URL = 4;
//     public static String XMLFileName = "video_content.xml";
// }


import android.app.FragmentManager;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import org.buildmlearn.toolkit.R;
import org.buildmlearn.toolkit.videocollectiontemplate.Constants;
import org.buildmlearn.toolkit.videocollectiontemplate.data.VideoDb;
                        AlertDialog welcomeAlert = builder.create();
                        welcomeAlert.show();
                        assert welcomeAlert.findViewById(android.R.id.message) != null;
                        assert welcomeAlert.findViewById(android.R.id.message) != null;
                        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 true;
            }
        });


        return rootView;
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        getLoaderManager().initLoader(DETAIL_LOADER, null, this);
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        if (null != video_Id) {
            switch (id) {
                case DETAIL_LOADER:

// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/videocollectiontemplate/Constants.java
// public class Constants {
//     public static final String[] VIDEO_COLUMNS = {
//             VideoContract.Videos.TABLE_NAME + "." + VideoContract.Videos._ID,
//             VideoContract.Videos.TITLE,
//             VideoContract.Videos.DESCRIPTION,
//             VideoContract.Videos.LINK,
//             VideoContract.Videos.THUMBNAIL_URL
//     };
//     public static final int COL_TITLE = 1;
//     public static final int COL_DESCRIPTION = 2;
//     public static final int COL_LINK = 3;
//     public static final int COL_THUMBNAIL_URL = 4;
//     public static String XMLFileName = "video_content.xml";
// }


// Path: source-code/app/src/main/java/org/buildmlearn/toolkit/videocollectiontemplate/fragment/DetailActivityFragment.java
import android.app.FragmentManager;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import org.buildmlearn.toolkit.R;
import org.buildmlearn.toolkit.videocollectiontemplate.Constants;
import org.buildmlearn.toolkit.videocollectiontemplate.data.VideoDb;

                        AlertDialog welcomeAlert = builder.create();
                        welcomeAlert.show();
                        assert welcomeAlert.findViewById(android.R.id.message) != null;
                        assert welcomeAlert.findViewById(android.R.id.message) != null;
                        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 true;
            }
        });


        return rootView;
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        getLoaderManager().initLoader(DETAIL_LOADER, null, this);
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        if (null != video_Id) {
            switch (id) {
                case DETAIL_LOADER:

                    return new CursorLoader(getActivity(), null, Constants.VIDEO_COLUMNS, null, null, null) {