// Path: src/ie/broadsheet/app/BroadsheetApplication.java
// public class BroadsheetApplication extends Application {
//     private static BroadsheetApplication mApp = null;
// 
//     private List<Post> posts;
// 
//     public List<Post> getPosts() {
//         return posts;
//     }
// 
//     private Tracker mGaTracker;
// 
//     private GoogleAnalytics mGaInstance;
// 
//     public void setPosts(List<Post> posts) {
//         if ((this.posts == null) || (posts == null)) {
//             this.posts = posts;
//         } else if (this.posts.size() > 0) {
//             // this.posts.addAll(posts);
//             for (Post post : posts) {
//                 this.posts.add(post);
//             }
//         } else {
//             this.posts = posts;
//         }
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         // Create global configuration and initialize ImageLoader with this configuration
//         ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).build();
//         ImageLoader.getInstance().init(config);
// 
//         this.posts = new ArrayList<Post>();
// 
//         Crashlytics.start(this);
// 
//         mGaInstance = GoogleAnalytics.getInstance(this);
// 
//         mGaTracker = mGaInstance.getTracker("UA-5653857-3");
// 
//         mApp = this;
//     }
// 
//     public Tracker getTracker() {
//         return mGaTracker;
//     }
// 
//     public static Context context() {
//         return mApp.getApplicationContext();
//     }
// 
// }


import ie.broadsheet.app.BroadsheetApplication;
import ie.broadsheet.app.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.Toast;
package ie.broadsheet.app.dialog;


public class AboutDialog extends DialogFragment implements OnClickListener {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

        builder.setTitle(R.string.about_title).setItems(R.array.about_array, this)
                .setPositiveButton(R.string.okay, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.dismiss();
                    }
                });

        return builder.create();
    }

    @Override
    public void onStart() {
        super.onStart();

// Path: src/ie/broadsheet/app/BroadsheetApplication.java
// public class BroadsheetApplication extends Application {
//     private static BroadsheetApplication mApp = null;
// 
//     private List<Post> posts;
// 
//     public List<Post> getPosts() {
//         return posts;
//     }
// 
//     private Tracker mGaTracker;
// 
//     private GoogleAnalytics mGaInstance;
// 
//     public void setPosts(List<Post> posts) {
//         if ((this.posts == null) || (posts == null)) {
//             this.posts = posts;
//         } else if (this.posts.size() > 0) {
//             // this.posts.addAll(posts);
//             for (Post post : posts) {
//                 this.posts.add(post);
//             }
//         } else {
//             this.posts = posts;
//         }
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         // Create global configuration and initialize ImageLoader with this configuration
//         ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).build();
//         ImageLoader.getInstance().init(config);
// 
//         this.posts = new ArrayList<Post>();
// 
//         Crashlytics.start(this);
// 
//         mGaInstance = GoogleAnalytics.getInstance(this);
// 
//         mGaTracker = mGaInstance.getTracker("UA-5653857-3");
// 
//         mApp = this;
//     }
// 
//     public Tracker getTracker() {
//         return mGaTracker;
//     }
// 
//     public static Context context() {
//         return mApp.getApplicationContext();
//     }
// 
// }


// Path: src/ie/broadsheet/app/dialog/AboutDialog.java
import ie.broadsheet.app.BroadsheetApplication;
import ie.broadsheet.app.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.Toast;

package ie.broadsheet.app.dialog;


public class AboutDialog extends DialogFragment implements OnClickListener {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

        builder.setTitle(R.string.about_title).setItems(R.array.about_array, this)
                .setPositiveButton(R.string.okay, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.dismiss();
                    }
                });

        return builder.create();
    }

    @Override
    public void onStart() {
        super.onStart();

        ((BroadsheetApplication) getActivity().getApplication()).getTracker().sendView("About");