// Path: app/src/main/java/com/hexforhn/hex/util/ThemeHelper.java
// public class ThemeHelper {
//     public static void applyTheme(Activity activity) {
//         if (shouldSetTheme(activity)) {
//             activity.setTheme(getDesiredTheme(activity));
//         }
//     }
// 
//     public static void updateTheme(Activity activity) {
//         if (shouldSetTheme(activity)) {
//             activity.recreate();
//         }
//     }
// 
//     private static boolean shouldSetTheme(Activity activity) {
//         return getCurrentTheme(activity) != getDesiredTheme(activity);
//     }
// 
//     private static int getDesiredTheme(Activity activity) {
//         SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity);
//         boolean useDarkTheme = sharedPref.getBoolean(activity.getString(R.string.enableDarkThemeSettingKey), false);
// 
//         return useDarkTheme ? R.style.AppThemeDark : R.style.AppThemeLight;
//     }
// 
//     private static int getCurrentTheme(Activity activity) {
//         TypedValue outValue = new TypedValue();
//         activity.getTheme().resolveAttribute(R.attr.themeName, outValue, true);
// 
//         return outValue.string.toString().equals("AppThemeDark") ? R.style.AppThemeDark : R.style.AppThemeLight;
//     }
// }


import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;
import com.hexforhn.hex.R;
import com.hexforhn.hex.util.ThemeHelper;
package com.hexforhn.hex.activity;


public class AboutActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ThemeHelper.applyTheme(this);
        setContentView(R.layout.activity_about);
        setupToolbar();

        TextView aboutText = (TextView) findViewById(R.id.aboutText);
        aboutText.setMovementMethod(LinkMovementMethod.getInstance());

        TextView feedbackText = (TextView) findViewById(R.id.feedbackText);
        feedbackText.setMovementMethod(LinkMovementMethod.getInstance());

        TextView contributingText = (TextView) findViewById(R.id.contributingText);
        contributingText.setMovementMethod(LinkMovementMethod.getInstance());
    }

    @Override
    public void onResume() {
        super.onResume();
// Path: app/src/main/java/com/hexforhn/hex/util/ThemeHelper.java
// public class ThemeHelper {
//     public static void applyTheme(Activity activity) {
//         if (shouldSetTheme(activity)) {
//             activity.setTheme(getDesiredTheme(activity));
//         }
//     }
// 
//     public static void updateTheme(Activity activity) {
//         if (shouldSetTheme(activity)) {
//             activity.recreate();
//         }
//     }
// 
//     private static boolean shouldSetTheme(Activity activity) {
//         return getCurrentTheme(activity) != getDesiredTheme(activity);
//     }
// 
//     private static int getDesiredTheme(Activity activity) {
//         SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity);
//         boolean useDarkTheme = sharedPref.getBoolean(activity.getString(R.string.enableDarkThemeSettingKey), false);
// 
//         return useDarkTheme ? R.style.AppThemeDark : R.style.AppThemeLight;
//     }
// 
//     private static int getCurrentTheme(Activity activity) {
//         TypedValue outValue = new TypedValue();
//         activity.getTheme().resolveAttribute(R.attr.themeName, outValue, true);
// 
//         return outValue.string.toString().equals("AppThemeDark") ? R.style.AppThemeDark : R.style.AppThemeLight;
//     }
// }


// Path: app/src/main/java/com/hexforhn/hex/activity/AboutActivity.java
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;
import com.hexforhn.hex.R;
import com.hexforhn.hex.util.ThemeHelper;

package com.hexforhn.hex.activity;


public class AboutActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ThemeHelper.applyTheme(this);
        setContentView(R.layout.activity_about);
        setupToolbar();

        TextView aboutText = (TextView) findViewById(R.id.aboutText);
        aboutText.setMovementMethod(LinkMovementMethod.getInstance());

        TextView feedbackText = (TextView) findViewById(R.id.feedbackText);
        feedbackText.setMovementMethod(LinkMovementMethod.getInstance());

        TextView contributingText = (TextView) findViewById(R.id.contributingText);
        contributingText.setMovementMethod(LinkMovementMethod.getInstance());
    }

    @Override
    public void onResume() {
        super.onResume();
        ThemeHelper.updateTheme(this);