// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public class Util {
// 
//     private static SharedPreferences mPreferences;
//     private static final String IDENTIFIER = "identifier";
//     private static OkHttpClient client;
// 
//     public static SharedPreferences getPrefernces(Context context){
//         if(mPreferences==null)
//         {
//             mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
//         }
//         return mPreferences;
//     }
// 
//     private static String getIdentifier() {
//         return (mPreferences!=null)?mPreferences.getString(IDENTIFIER,""):"";
//     }
// 
//     public static String getUuid() {
//         String prefix=(TextUtils.isEmpty(getIdentifier()))?"":getIdentifier()+".";
//         return prefix + UUID.randomUUID().toString();
//     }
// 
//     public static OkHttpClient getOkhttp() {
//         if (client == null)
//             client = new OkHttpClient();
//         return client;
//     }
// 
// 
// }
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String BASE_THEME = "base_theme";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String BASE_THEME_INTEGER = "base_theme_integer";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public static final int LIGHT_THEME = 1, DARK_THEME = 2;


import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.game.dhanraj.myownalexa.sharedpref.Util;
import com.mikepenz.iconics.view.IconicsImageView;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import static com.game.dhanraj.myownalexa.Constants.BASE_THEME;
import static com.game.dhanraj.myownalexa.Constants.BASE_THEME_INTEGER;
import static com.game.dhanraj.myownalexa.Constants.DARK_THEME;
import static com.game.dhanraj.myownalexa.Constants.LIGHT_THEME;
                whiteSelect.setVisibility(View.GONE);
                darkSelect.setVisibility(View.VISIBLE);
                break;
        }

        /** SET OBJ THEME **/
        dialogCardView.setCardBackgroundColor(R.color.cardview_light_background);

        dialogLayout.findViewById(R.id.ll_white_basic_theme).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                whiteSelect.setVisibility(View.VISIBLE);
                darkSelect.setVisibility(View.GONE);
                setBaseTheme(LIGHT_THEME, false);
            }
        });
        dialogLayout.findViewById(R.id.ll_dark_basic_theme).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                whiteSelect.setVisibility(View.GONE);
                darkSelect.setVisibility(View.VISIBLE);
                setBaseTheme(DARK_THEME, false);
            }
        });

        dialogBuilder.setView(dialogLayout);
        dialogBuilder.setPositiveButton(getString(R.string.ok_action).toUpperCase(), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                SharedPreferences.Editor preferences = sharedPreferences.edit();
                preferences.putInt(BASE_THEME, getBaseTheme());
// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public class Util {
// 
//     private static SharedPreferences mPreferences;
//     private static final String IDENTIFIER = "identifier";
//     private static OkHttpClient client;
// 
//     public static SharedPreferences getPrefernces(Context context){
//         if(mPreferences==null)
//         {
//             mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
//         }
//         return mPreferences;
//     }
// 
//     private static String getIdentifier() {
//         return (mPreferences!=null)?mPreferences.getString(IDENTIFIER,""):"";
//     }
// 
//     public static String getUuid() {
//         String prefix=(TextUtils.isEmpty(getIdentifier()))?"":getIdentifier()+".";
//         return prefix + UUID.randomUUID().toString();
//     }
// 
//     public static OkHttpClient getOkhttp() {
//         if (client == null)
//             client = new OkHttpClient();
//         return client;
//     }
// 
// 
// }
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String BASE_THEME = "base_theme";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String BASE_THEME_INTEGER = "base_theme_integer";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public static final int LIGHT_THEME = 1, DARK_THEME = 2;


// Path: app/src/main/java/com/game/dhanraj/myownalexa/SettingsActivity.java
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.game.dhanraj.myownalexa.sharedpref.Util;
import com.mikepenz.iconics.view.IconicsImageView;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import static com.game.dhanraj.myownalexa.Constants.BASE_THEME;
import static com.game.dhanraj.myownalexa.Constants.BASE_THEME_INTEGER;
import static com.game.dhanraj.myownalexa.Constants.DARK_THEME;
import static com.game.dhanraj.myownalexa.Constants.LIGHT_THEME;

                whiteSelect.setVisibility(View.GONE);
                darkSelect.setVisibility(View.VISIBLE);
                break;
        }

        /** SET OBJ THEME **/
        dialogCardView.setCardBackgroundColor(R.color.cardview_light_background);

        dialogLayout.findViewById(R.id.ll_white_basic_theme).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                whiteSelect.setVisibility(View.VISIBLE);
                darkSelect.setVisibility(View.GONE);
                setBaseTheme(LIGHT_THEME, false);
            }
        });
        dialogLayout.findViewById(R.id.ll_dark_basic_theme).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                whiteSelect.setVisibility(View.GONE);
                darkSelect.setVisibility(View.VISIBLE);
                setBaseTheme(DARK_THEME, false);
            }
        });

        dialogBuilder.setView(dialogLayout);
        dialogBuilder.setPositiveButton(getString(R.string.ok_action).toUpperCase(), new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                SharedPreferences.Editor preferences = sharedPreferences.edit();
                preferences.putInt(BASE_THEME, getBaseTheme());
                preferences.putInt(BASE_THEME_INTEGER, getBaseThemeInteger());