summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/xc3fff0e
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/xc3fff0e')
-rw-r--r--app/src/main/java/com/xc3fff0e/xmanager/MainActivity.java2372
1 files changed, 1972 insertions, 400 deletions
diff --git a/app/src/main/java/com/xc3fff0e/xmanager/MainActivity.java b/app/src/main/java/com/xc3fff0e/xmanager/MainActivity.java
index 3c4a37c..20619d1 100644
--- a/app/src/main/java/com/xc3fff0e/xmanager/MainActivity.java
+++ b/app/src/main/java/com/xc3fff0e/xmanager/MainActivity.java
@@ -1,29 +1,39 @@
package com.xc3fff0e.xmanager;
+import com.xc3fff0e.xmanager.SplashActivity;
import androidx.appcompat.app.AppCompatActivity;
+import androidx.annotation.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.view.View.*;
import android.widget.*;
import android.content.*;
+import android.content.res.*;
import android.graphics.*;
+import android.graphics.drawable.*;
import android.media.*;
import android.net.*;
import android.text.*;
+import android.text.style.*;
import android.util.*;
import android.webkit.*;
import android.animation.*;
import android.view.animation.*;
import java.util.*;
+import java.util.regex.*;
import java.text.*;
+import org.json.*;
import java.util.HashMap;
import java.util.ArrayList;
import android.widget.LinearLayout;
import android.widget.ScrollView;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener;
import android.widget.TextView;
import android.widget.ImageView;
import android.widget.Switch;
+import android.widget.EditText;
import android.widget.ListView;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
@@ -42,15 +52,31 @@ import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.GenericTypeIndicator;
import com.google.firebase.database.ChildEventListener;
+import com.google.firebase.iid.FirebaseInstanceId;
+import com.google.firebase.iid.InstanceIdResult;
+import com.google.firebase.messaging.FirebaseMessaging;
+import androidx.core.content.FileProvider;
+import java.io.File;
import android.widget.CompoundButton;
import android.view.View;
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import android.text.Editable;
+import android.text.TextWatcher;
import android.graphics.Typeface;
+import android.content.ClipData;
+import android.content.ClipboardManager;
+import com.wuyr.rippleanimation.*;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.DialogFragment;
import androidx.core.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import android.Manifest;
import android.content.pm.PackageManager;
-public class MainActivity extends AppCompatActivity {
+
+public class MainActivity extends AppCompatActivity {
private Timer _timer = new Timer();
private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
@@ -64,12 +90,12 @@ public class MainActivity extends AppCompatActivity {
private String Current_Version = "";
private String Package_Name = "";
private HashMap<String, Object> Versions = new HashMap<>();
- private HashMap<String, Object> vmap_data = new HashMap<>();
- private boolean Lock_Check = false;
private String Regular_Title = "";
private String Regular_Link = "";
private String Amoled_Title = "";
private String Amoled_Link = "";
+ private String PATH = "";
+ private String ACCENT = "";
private ArrayList<HashMap<String, Object>> listdata = new ArrayList<>();
private ArrayList<HashMap<String, Object>> Versions_1 = new ArrayList<>();
@@ -77,9 +103,9 @@ public class MainActivity extends AppCompatActivity {
private LinearLayout box_header;
private LinearLayout main_body_optimization;
- private LinearLayout main_body_settings;
+ private ScrollView main_scroll_settings;
private ScrollView main_scroll_about;
- private main_refresh_layout;
+ private SwipeRefreshLayout main_refresh_layout;
private TextView title_header;
private LinearLayout box_header_tab;
private LinearLayout box_switch;
@@ -88,11 +114,36 @@ public class MainActivity extends AppCompatActivity {
private ImageView icon_update;
private TextView hidden_download;
private TextView app_changelogs;
+ private LinearLayout main_body_settings;
private LinearLayout box_settings_close;
+ private LinearLayout main_box_8;
+ private LinearLayout main_box_11;
+ private LinearLayout main_box_12;
private LinearLayout main_box_7;
private LinearLayout main_box_5;
+ private LinearLayout main_box_9;
+ private LinearLayout main_box_10;
+ private LinearLayout box_reset_settings;
private LinearLayout box_settings_icon_close;
private ImageView settings_icon_close;
+ private LinearLayout box_8_sub_1;
+ private LinearLayout box_8_sub_2;
+ private TextView list_auto_refresh;
+ private LinearLayout box_list_auto_refresh;
+ private Switch list_auto_refresh_switch;
+ private TextView list_auto_refresh_info;
+ private LinearLayout box_11_sub_1;
+ private LinearLayout box_11_sub_2;
+ private TextView force_auto_install;
+ private LinearLayout box_force_auto_install;
+ private Switch force_auto_install_switch;
+ private TextView force_auto_install_info;
+ private LinearLayout box_12_sub_1;
+ private LinearLayout box_12_sub_2;
+ private TextView copy_url_mode;
+ private LinearLayout box_copy_url_mode;
+ private Switch copy_url_mode_switch;
+ private TextView copy_file_url_mode_info;
private LinearLayout box_7_sub_1;
private TextView navigation_bar;
private LinearLayout box_navigation_switch;
@@ -130,6 +181,14 @@ public class MainActivity extends AppCompatActivity {
private TextView gray_theme;
private LinearLayout box_gray_switch;
private Switch gray_switch;
+ private LinearLayout box_9_sub_1;
+ private LinearLayout box_9_sub_2;
+ private TextView apk_location;
+ private EditText apk_path_location;
+ private TextView apk_location_info;
+ private LinearLayout box_10_sub_1;
+ private TextView clear_directory_folders;
+ private TextView reset_settings;
private LinearLayout main_body_about;
private LinearLayout box_about_close;
private LinearLayout box_about_header;
@@ -253,23 +312,29 @@ public class MainActivity extends AppCompatActivity {
private ChildEventListener _xManager_Update_child_listener;
private DatabaseReference Mod_Changelogs = _firebase.getReference("Mod_Changelogs");
private ChildEventListener _Mod_Changelogs_child_listener;
- private xManager_Notification;
+
+ private OnCompleteListener xManager_Notification_onCompleteListener;
private DatabaseReference xManager_Changelogs = _firebase.getReference("xManager_Changelogs");
private ChildEventListener _xManager_Changelogs_child_listener;
- private FileProvider;
- private File_Fixer;
+ private FileProvider FileProvider;
+ private File File_Fixer;
private Intent Source = new Intent();
private DatabaseReference Regular_Mod = _firebase.getReference("Regular_Mod");
private ChildEventListener _Regular_Mod_child_listener;
private DatabaseReference Amoled_Black = _firebase.getReference("Amoled_Black");
private ChildEventListener _Amoled_Black_child_listener;
private SharedPreferences NAVIGATION_BAR;
+ private SharedPreferences LIST_REFRESH;
+ private SharedPreferences APK_PATH;
+ private SharedPreferences FORCE_INSTALL;
+ private SharedPreferences FORCE_INSTALL_UPDATE;
+ private SharedPreferences COPY_URL_MODE;
@Override
protected void onCreate(Bundle _savedInstanceState) {
super.onCreate(_savedInstanceState);
setContentView(R.layout.main);
- com.google.firebase.FirebaseApp.initializeApp(this);
initialize(_savedInstanceState);
+ com.google.firebase.FirebaseApp.initializeApp(this);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED
|| ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) {
ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1000);
@@ -290,9 +355,9 @@ public class MainActivity extends AppCompatActivity {
box_header = (LinearLayout) findViewById(R.id.box_header);
main_body_optimization = (LinearLayout) findViewById(R.id.main_body_optimization);
- main_body_settings = (LinearLayout) findViewById(R.id.main_body_settings);
+ main_scroll_settings = (ScrollView) findViewById(R.id.main_scroll_settings);
main_scroll_about = (ScrollView) findViewById(R.id.main_scroll_about);
- main_refresh_layout = () findViewById(R.id.main_refresh_layout);
+ main_refresh_layout = (SwipeRefreshLayout) findViewById(R.id.main_refresh_layout);
title_header = (TextView) findViewById(R.id.title_header);
box_header_tab = (LinearLayout) findViewById(R.id.box_header_tab);
box_switch = (LinearLayout) findViewById(R.id.box_switch);
@@ -301,11 +366,36 @@ public class MainActivity extends AppCompatActivity {
icon_update = (ImageView) findViewById(R.id.icon_update);
hidden_download = (TextView) findViewById(R.id.hidden_download);
app_changelogs = (TextView) findViewById(R.id.app_changelogs);
+ main_body_settings = (LinearLayout) findViewById(R.id.main_body_settings);
box_settings_close = (LinearLayout) findViewById(R.id.box_settings_close);
+ main_box_8 = (LinearLayout) findViewById(R.id.main_box_8);
+ main_box_11 = (LinearLayout) findViewById(R.id.main_box_11);
+ main_box_12 = (LinearLayout) findViewById(R.id.main_box_12);
main_box_7 = (LinearLayout) findViewById(R.id.main_box_7);
main_box_5 = (LinearLayout) findViewById(R.id.main_box_5);
+ main_box_9 = (LinearLayout) findViewById(R.id.main_box_9);
+ main_box_10 = (LinearLayout) findViewById(R.id.main_box_10);
+ box_reset_settings = (LinearLayout) findViewById(R.id.box_reset_settings);
box_settings_icon_close = (LinearLayout) findViewById(R.id.box_settings_icon_close);
settings_icon_close = (ImageView) findViewById(R.id.settings_icon_close);
+ box_8_sub_1 = (LinearLayout) findViewById(R.id.box_8_sub_1);
+ box_8_sub_2 = (LinearLayout) findViewById(R.id.box_8_sub_2);
+ list_auto_refresh = (TextView) findViewById(R.id.list_auto_refresh);
+ box_list_auto_refresh = (LinearLayout) findViewById(R.id.box_list_auto_refresh);
+ list_auto_refresh_switch = (Switch) findViewById(R.id.list_auto_refresh_switch);
+ list_auto_refresh_info = (TextView) findViewById(R.id.list_auto_refresh_info);
+ box_11_sub_1 = (LinearLayout) findViewById(R.id.box_11_sub_1);
+ box_11_sub_2 = (LinearLayout) findViewById(R.id.box_11_sub_2);
+ force_auto_install = (TextView) findViewById(R.id.force_auto_install);
+ box_force_auto_install = (LinearLayout) findViewById(R.id.box_force_auto_install);
+ force_auto_install_switch = (Switch) findViewById(R.id.force_auto_install_switch);
+ force_auto_install_info = (TextView) findViewById(R.id.force_auto_install_info);
+ box_12_sub_1 = (LinearLayout) findViewById(R.id.box_12_sub_1);
+ box_12_sub_2 = (LinearLayout) findViewById(R.id.box_12_sub_2);
+ copy_url_mode = (TextView) findViewById(R.id.copy_url_mode);
+ box_copy_url_mode = (LinearLayout) findViewById(R.id.box_copy_url_mode);
+ copy_url_mode_switch = (Switch) findViewById(R.id.copy_url_mode_switch);
+ copy_file_url_mode_info = (TextView) findViewById(R.id.copy_file_url_mode_info);
box_7_sub_1 = (LinearLayout) findViewById(R.id.box_7_sub_1);
navigation_bar = (TextView) findViewById(R.id.navigation_bar);
box_navigation_switch = (LinearLayout) findViewById(R.id.box_navigation_switch);
@@ -343,6 +433,14 @@ public class MainActivity extends AppCompatActivity {
gray_theme = (TextView) findViewById(R.id.gray_theme);
box_gray_switch = (LinearLayout) findViewById(R.id.box_gray_switch);
gray_switch = (Switch) findViewById(R.id.gray_switch);
+ box_9_sub_1 = (LinearLayout) findViewById(R.id.box_9_sub_1);
+ box_9_sub_2 = (LinearLayout) findViewById(R.id.box_9_sub_2);
+ apk_location = (TextView) findViewById(R.id.apk_location);
+ apk_path_location = (EditText) findViewById(R.id.apk_path_location);
+ apk_location_info = (TextView) findViewById(R.id.apk_location_info);
+ box_10_sub_1 = (LinearLayout) findViewById(R.id.box_10_sub_1);
+ clear_directory_folders = (TextView) findViewById(R.id.clear_directory_folders);
+ reset_settings = (TextView) findViewById(R.id.reset_settings);
main_body_about = (LinearLayout) findViewById(R.id.main_body_about);
box_about_close = (LinearLayout) findViewById(R.id.box_about_close);
box_about_header = (LinearLayout) findViewById(R.id.box_about_header);
@@ -456,18 +554,40 @@ public class MainActivity extends AppCompatActivity {
Update_Unauthorized = new AlertDialog.Builder(this);
Update_Latest = new AlertDialog.Builder(this);
NAVIGATION_BAR = getSharedPreferences("NAVIGATION_BAR", Activity.MODE_PRIVATE);
+ LIST_REFRESH = getSharedPreferences("LIST_REFRESH", Activity.MODE_PRIVATE);
+ APK_PATH = getSharedPreferences("APK_PATH", Activity.MODE_PRIVATE);
+ FORCE_INSTALL = getSharedPreferences("FORCE_INSTALL", Activity.MODE_PRIVATE);
+ FORCE_INSTALL_UPDATE = getSharedPreferences("FORCE_INSTALL_UPDATE", Activity.MODE_PRIVATE);
+ COPY_URL_MODE = getSharedPreferences("COPY_URL_MODE", Activity.MODE_PRIVATE);
box_switch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
-
+ RippleAnimation.create(box_switch).setDuration((long)700).start();
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.VISIBLE);
main_scroll_about.setVisibility(View.GONE);
main_refresh_layout.setVisibility(View.GONE);
- main_body_optimization.setVisibility(View.GONE);
- main_body_settings.setVisibility(View.VISIBLE);
box_update.setVisibility(View.GONE);
box_switch.setVisibility(View.GONE);
+ apk_path_location.setEnabled(true);
title_header.setText("Settings");
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("X") && FORCE_INSTALL_UPDATE.getString("FORCE_INSTALL_UPDATE", "").equals("XX")) {
+ force_auto_install_switch.setChecked(true);
+ }
+ else {
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("Y") && FORCE_INSTALL.getString("FORCE_INSTALL_UPDATE", "").equals("YY")) {
+ force_auto_install_switch.setChecked(false);
+ }
+ }
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_ON")) {
+ copy_url_mode_switch.setChecked(true);
+ }
+ else {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_OFF")) {
+ copy_url_mode_switch.setChecked(false);
+ }
+ }
_Animation_1();
}
});
@@ -498,9 +618,20 @@ public class MainActivity extends AppCompatActivity {
Update_Authorized.setPositiveButton("DOWNLOAD UPDATE", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Update_Authorized, true);
- _Download_Update(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
- _Update_Remover();
+ try {
+ _RequiredDialog(Update_Authorized, true);
+ if (FORCE_INSTALL_UPDATE.getString("FORCE_INSTALL_UPDATE", "").equals("XX")) {
+ _Download_Update_Install(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
+ }
+ else {
+ if (FORCE_INSTALL_UPDATE.getString("FORCE_INSTALL_UPDATE", "").equals("YY")) {
+ _Download_Update(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
+ }
+ }
+ _Update_Remover();
+ }
+ catch(Exception e) {
+ }
Timer = new TimerTask() {
@Override
public void run() {
@@ -595,18 +726,102 @@ public class MainActivity extends AppCompatActivity {
}
});
+ main_box_10.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View _view) {
+ if (FileUtil.isExistFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/") && FileUtil.isExistFile(apk_path_location.getText().toString())) {
+ FileUtil.deleteFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/");
+ FileUtil.deleteFile(apk_path_location.getText().toString());
+ SketchwareUtil.CustomToast(getApplicationContext(), "Successfully deleted", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ else {
+ if (!(FileUtil.isExistFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/") && FileUtil.isExistFile(apk_path_location.getText().toString()))) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Directory folders not found or deleted", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ }
+ });
+
+ box_reset_settings.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View _view) {
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(false);
+ list_auto_refresh_switch.setChecked(false);
+ force_auto_install_switch.setChecked(false);
+ copy_url_mode_switch.setChecked(false);
+ navigation_switch.setChecked(false);
+ theme_switch.setChecked(false);
+ green_switch.setChecked(false);
+ purple_switch.setChecked(false);
+ red_switch.setChecked(false);
+ blue_switch.setChecked(false);
+ orange_switch.setChecked(false);
+ yellow_switch.setChecked(false);
+ gray_switch.setChecked(false);
+ apk_path_location.setText("/storage/emulated/0/xManager/");
+ SketchwareUtil.CustomToast(getApplicationContext(), "Back to default settings", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ });
+
box_settings_icon_close.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
-
+ RippleAnimation.create(box_settings_icon_close).setDuration((long)700).start();
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
main_scroll_about.setVisibility(View.GONE);
main_refresh_layout.setVisibility(View.VISIBLE);
- main_body_optimization.setVisibility(View.GONE);
- main_body_settings.setVisibility(View.GONE);
box_update.setVisibility(View.VISIBLE);
box_switch.setVisibility(View.VISIBLE);
+ apk_path_location.setEnabled(false);
title_header.setText("xManager");
_Animation_0();
+ _Url_Mode();
+ }
+ });
+
+ list_auto_refresh_switch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton _param1, boolean _param2) {
+ final boolean _isChecked = _param2;
+ if (_isChecked) {
+ LIST_REFRESH.edit().putString("UPDATE", "ON").commit();
+ }
+ else {
+ LIST_REFRESH.edit().putString("UPDATE", "OFF").commit();
+ SketchwareUtil.CustomToast(getApplicationContext(), "NOTE: You can manually refresh the list by pulling down on the main screen", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ });
+
+ force_auto_install_switch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton _param1, boolean _param2) {
+ final boolean _isChecked = _param2;
+ if (_isChecked) {
+ FORCE_INSTALL.edit().putString("FORCE_INSTALL", "X").commit();
+ FORCE_INSTALL_UPDATE.edit().putString("FORCE_INSTALL_UPDATE", "XX").commit();
+ }
+ else {
+ FORCE_INSTALL.edit().putString("FORCE_INSTALL", "Y").commit();
+ FORCE_INSTALL_UPDATE.edit().putString("FORCE_INSTALL_UPDATE", "YY").commit();
+ }
+ }
+ });
+
+ copy_url_mode_switch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton _param1, boolean _param2) {
+ final boolean _isChecked = _param2;
+ if (_isChecked) {
+ COPY_URL_MODE.edit().putString("COPY_URL_MODE", "URL_ON").commit();
+ SketchwareUtil.CustomToast(getApplicationContext(), "URL MODE ACTIVATED", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ else {
+ COPY_URL_MODE.edit().putString("COPY_URL_MODE", "URL_OFF").commit();
+ }
}
});
@@ -617,7 +832,6 @@ public class MainActivity extends AppCompatActivity {
if (_isChecked) {
NAVIGATION_BAR.edit().putString("NAVIGATION", "1").commit();
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
- navigation_switch.setChecked(true);
}
else {
NAVIGATION_BAR.edit().putString("NAVIGATION", "0").commit();
@@ -626,7 +840,6 @@ public class MainActivity extends AppCompatActivity {
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setNavigationBarColor(Color.parseColor("#212121"));
}
- navigation_switch.setChecked(false);
}
}
});
@@ -654,9 +867,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -668,9 +881,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -682,9 +895,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -696,9 +909,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -710,9 +923,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -724,9 +937,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -738,9 +951,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -752,9 +965,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -779,9 +992,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -793,9 +1006,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -807,9 +1020,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -821,9 +1034,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -835,9 +1048,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -849,9 +1062,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -863,9 +1076,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -877,9 +1090,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -904,9 +1117,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -918,9 +1131,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -932,9 +1145,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -946,9 +1159,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -960,9 +1173,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -974,9 +1187,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -988,9 +1201,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1002,9 +1215,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1029,9 +1242,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1043,9 +1256,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -1057,9 +1270,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -1071,9 +1284,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1085,9 +1298,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1099,9 +1312,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1113,9 +1326,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1127,9 +1340,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1154,9 +1367,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1168,9 +1381,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -1182,9 +1395,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -1196,9 +1409,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1210,9 +1423,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1224,9 +1437,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1238,9 +1451,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1252,9 +1465,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1279,9 +1492,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1293,9 +1506,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -1307,9 +1520,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -1321,9 +1534,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1335,9 +1548,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1349,9 +1562,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1363,9 +1576,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (gray_switch.isChecked()) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1377,9 +1590,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1404,9 +1617,9 @@ public class MainActivity extends AppCompatActivity {
final boolean _isChecked = _param2;
if (_isChecked) {
THEME.edit().putString("THEME", "7").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1418,9 +1631,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (purple_switch.isChecked()) {
THEME.edit().putString("THEME", "2").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -1432,9 +1645,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (red_switch.isChecked()) {
THEME.edit().putString("THEME", "3").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -1446,9 +1659,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (blue_switch.isChecked()) {
THEME.edit().putString("THEME", "4").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1460,9 +1673,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (orange_switch.isChecked()) {
THEME.edit().putString("THEME", "5").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1474,9 +1687,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (yellow_switch.isChecked()) {
THEME.edit().putString("THEME", "6").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1488,9 +1701,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (green_switch.isChecked()) {
THEME.edit().putString("THEME", "1").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1502,9 +1715,9 @@ public class MainActivity extends AppCompatActivity {
else {
if (!(green_switch.isChecked() && (purple_switch.isChecked() && red_switch.isChecked()))) {
THEME.edit().putString("THEME", "0").commit();
-
-
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_about.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
+ main_scroll_settings.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -1523,18 +1736,38 @@ public class MainActivity extends AppCompatActivity {
}
});
+ apk_path_location.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void onTextChanged(CharSequence _param1, int _param2, int _param3, int _param4) {
+ final String _charSeq = _param1.toString();
+ PATH = _charSeq;
+ _Default_Path();
+ }
+
+ @Override
+ public void beforeTextChanged(CharSequence _param1, int _param2, int _param3, int _param4) {
+
+ }
+
+ @Override
+ public void afterTextChanged(Editable _param1) {
+
+ }
+ });
+
box_icon_close.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
-
+ RippleAnimation.create(box_icon_close).setDuration((long)700).start();
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
main_scroll_about.setVisibility(View.GONE);
main_refresh_layout.setVisibility(View.VISIBLE);
- main_body_optimization.setVisibility(View.GONE);
- main_body_settings.setVisibility(View.GONE);
box_update.setVisibility(View.VISIBLE);
box_switch.setVisibility(View.VISIBLE);
title_header.setText("xManager");
_Animation_0();
+ _Url_Mode();
}
});
@@ -1563,6 +1796,7 @@ public class MainActivity extends AppCompatActivity {
catch (Exception _e) {
_e.printStackTrace();
}
+ sub_1.setText(SUB_1.getString("SUB_1", ""));
list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
}
@@ -1630,17 +1864,17 @@ public class MainActivity extends AppCompatActivity {
public void onCancelled(DatabaseError _databaseError) {
}
});
- main_refresh_layout.setEnabled(false);
}
catch(Exception e) {
SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Fetching failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
+ main_refresh_layout.setEnabled(false);
}
else {
+ main_refresh_layout.setEnabled(true);
list_menu_1.setVisibility(View.GONE);
list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
- main_refresh_layout.setEnabled(true);
}
}
catch(Exception e) {
@@ -1673,6 +1907,7 @@ public class MainActivity extends AppCompatActivity {
catch (Exception _e) {
_e.printStackTrace();
}
+ sub_3.setText(SUB_2.getString("SUB_2", ""));
list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
}
@@ -1740,17 +1975,17 @@ public class MainActivity extends AppCompatActivity {
public void onCancelled(DatabaseError _databaseError) {
}
});
- main_refresh_layout.setEnabled(false);
}
catch(Exception e) {
SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Fetching failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
+ main_refresh_layout.setEnabled(false);
}
else {
+ main_refresh_layout.setEnabled(true);
list_menu_2.setVisibility(View.GONE);
list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
- main_refresh_layout.setEnabled(true);
}
}
catch(Exception e) {
@@ -1774,6 +2009,14 @@ public class MainActivity extends AppCompatActivity {
}
});
+ box_uninstall.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View _view) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Uninstall spotify app", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ return true;
+ }
+ });
+
box_uninstall.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
@@ -1787,6 +2030,14 @@ public class MainActivity extends AppCompatActivity {
}
});
+ box_settings.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View _view) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Open spotify's app settings", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ return true;
+ }
+ });
+
box_settings.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
@@ -1800,6 +2051,14 @@ public class MainActivity extends AppCompatActivity {
}
});
+ box_cache.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View _view) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Clear offline cached datas", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ return true;
+ }
+ });
+
box_cache.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
@@ -1851,7 +2110,7 @@ public class MainActivity extends AppCompatActivity {
}
};
_timer.schedule(Timer, (int)(100));
-
+ SketchwareUtil.CustomToast(getApplicationContext(), "Successfully deleted", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
});
}
@@ -1871,7 +2130,7 @@ public class MainActivity extends AppCompatActivity {
}
};
_timer.schedule(Timer, (int)(100));
-
+ SketchwareUtil.CustomToast(getApplicationContext(), "Directory files are empty", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
}
});
@@ -1900,6 +2159,14 @@ public class MainActivity extends AppCompatActivity {
}
});
+ box_open.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View _view) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Launch spotify app", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ return true;
+ }
+ });
+
box_open.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
@@ -1988,11 +2255,11 @@ public class MainActivity extends AppCompatActivity {
box_about.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
-
+ RippleAnimation.create(box_about).setDuration((long)700).start();
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
main_scroll_about.setVisibility(View.VISIBLE);
main_refresh_layout.setVisibility(View.GONE);
- main_body_optimization.setVisibility(View.GONE);
- main_body_settings.setVisibility(View.GONE);
box_update.setVisibility(View.GONE);
box_switch.setVisibility(View.GONE);
title_header.setText("About");
@@ -2002,9 +2269,10 @@ public class MainActivity extends AppCompatActivity {
_Connection_request_listener = new RequestNetwork.RequestListener() {
@Override
- public void onResponse(String _param1, String _param2) {
+ public void onResponse(String _param1, String _param2, HashMap<String, Object> _param3) {
final String _tag = _param1;
final String _response = _param2;
+ final HashMap<String, Object> _responseHeaders = _param3;
Regular_Mod.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot _dataSnapshot) {
@@ -2020,7 +2288,7 @@ public class MainActivity extends AppCompatActivity {
_e.printStackTrace();
}
sub_1.setText(SUB_1.getString("SUB_1", ""));
-
+ main_refresh_layout.setRefreshing(true);
main_body.setEnabled(false);
main_body.setAlpha((float)(0.65d));
}
@@ -2043,7 +2311,7 @@ public class MainActivity extends AppCompatActivity {
_e.printStackTrace();
}
sub_3.setText(SUB_2.getString("SUB_2", ""));
-
+ main_refresh_layout.setRefreshing(false);
main_body.setEnabled(true);
main_body.setAlpha((float)(1.0d));
}
@@ -2057,7 +2325,7 @@ public class MainActivity extends AppCompatActivity {
public void onErrorResponse(String _param1, String _param2) {
final String _tag = _param1;
final String _message = _param2;
-
+ main_refresh_layout.setRefreshing(true);
main_body.setAlpha((float)(0.65d));
Timer = new TimerTask() {
@Override
@@ -2065,7 +2333,7 @@ public class MainActivity extends AppCompatActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
+ main_refresh_layout.setRefreshing(false);
main_body.setAlpha((float)(1.0d));
}
});
@@ -2230,6 +2498,20 @@ public class MainActivity extends AppCompatActivity {
};
Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
+ xManager_Notification_onCompleteListener = new OnCompleteListener<InstanceIdResult>() {
+ @Override
+ public void onComplete(Task<InstanceIdResult> task) {
+ final boolean _success = task.isSuccessful();
+ final String _token = task.getResult().getToken();
+ final String _errorMessage = task.getException() != null ? task.getException().getMessage() : "";
+ try {
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Failed to receive notification", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ };
+
_xManager_Changelogs_child_listener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot _param1, String _param2) {
@@ -2337,6 +2619,7 @@ public class MainActivity extends AppCompatActivity {
catch (Exception _e) {
_e.printStackTrace();
}
+ listdata.add(_childValue);
list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
}
@@ -2417,6 +2700,7 @@ public class MainActivity extends AppCompatActivity {
catch (Exception _e) {
_e.printStackTrace();
}
+ listdata.add(_childValue);
list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
}
@@ -2448,6 +2732,7 @@ public class MainActivity extends AppCompatActivity {
};
Amoled_Black.addChildEventListener(_Amoled_Black_child_listener);
}
+
private void initializeLogic() {
try {
_Dark_Navigation();
@@ -2461,6 +2746,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onActivityResult(int _requestCode, int _resultCode, Intent _data) {
+
super.onActivityResult(_requestCode, _resultCode, _data);
switch (_requestCode) {
@@ -2486,7 +2772,7 @@ public class MainActivity extends AppCompatActivity {
}
};
_timer.schedule(Timer, (int)(1000));
-
+ SketchwareUtil.CustomToast(getApplicationContext(), "Press back again to exit", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
else {
finishAndRemoveTask();
@@ -2499,7 +2785,7 @@ public class MainActivity extends AppCompatActivity {
super.onResume();
_Hide_Navigation();
}
- private void _Informations () {
+ public void _Informations () {
sub_2.setText("N/A");
cpu.setText("N/A");
Timer = new TimerTask() {
@@ -2542,12 +2828,12 @@ public class MainActivity extends AppCompatActivity {
}
- private void _RequiredDialog (final AlertDialog.Builder _Dialog, final boolean _True) {
+ public void _RequiredDialog (final AlertDialog.Builder _Dialog, final boolean _True) {
_Dialog.setCancelable(_True);
}
- private void _Download (final String _url, final String _path) {
+ public void _Download (final String _url, final String _path) {
try {
FileUtil.makeDir(FileUtil.getPackageDataDir(getApplicationContext()));
@@ -2567,8 +2853,7 @@ public class MainActivity extends AppCompatActivity {
request.setMimeType("application/vnd.android.package-archive");
request.allowScanningByMediaScanner();
-
- request.setDestinationInExternalFilesDir(this,Environment.DIRECTORY_DOWNLOADS, "Spotify Mod (Official).apk");
+ request.setDestinationInExternalFilesDir(this,Environment.DIRECTORY_DOWNLOADS, "Spotify Mod (Official).apk");
final DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
@@ -2643,8 +2928,7 @@ public class MainActivity extends AppCompatActivity {
public void run() {
try {
- FileUtil.copyFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk", "/storage/emulated/0/xManager/Spotify Mod (Official).apk");
- prog.dismiss();
+ FileUtil.copyFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk", apk_path_location.getText().toString().concat("Spotify Mod (Official).apk"));
}
catch(Exception e) {
SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Copying failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
@@ -2652,11 +2936,14 @@ public class MainActivity extends AppCompatActivity {
_RequiredDialog(Success_Download, false);
Success_Download.setTitle("SUCCESSFULLY DOWNLOADED");
- Success_Download.setMessage("FILE DIRECTORY:\n</storage/emulated/0/xManager/>");
+ Success_Download.setMessage("FILE DIRECTORY:\n<".concat(apk_path_location.getText().toString().concat(">")));
Success_Download.setPositiveButton("INSTALL NOW", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface _dialog, int _which) {
_RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
if(android.os.Build.VERSION.SDK_INT >= 29){
@@ -2704,6 +2991,9 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface _dialog, int _which) {
_RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
Timer = new TimerTask() {
@Override
public void run() {
@@ -2741,17 +3031,20 @@ public class MainActivity extends AppCompatActivity {
}
- private void _File_Remover () {
+ public void _File_Remover () {
if (FileUtil.isExistFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk")) {
FileUtil.deleteFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk");
}
+ if (FileUtil.isExistFile(apk_path_location.getText().toString().concat("Spotify Mod (Official).apk"))) {
+ FileUtil.deleteFile(apk_path_location.getText().toString().concat("Spotify Mod (Official).apk"));
+ }
if (FileUtil.isExistFile("/storage/emulated/0/xManager/Spotify Mod (Official).apk")) {
FileUtil.deleteFile("/storage/emulated/0/xManager/Spotify Mod (Official).apk");
}
}
- private void _Update_Remover () {
+ public void _Update_Remover () {
if (FileUtil.isExistFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk")) {
FileUtil.deleteFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk");
}
@@ -2761,7 +3054,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Model_UI () {
+ public void _Model_UI () {
title_header.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
title_sub.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
title_1.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
@@ -2812,31 +3105,47 @@ public class MainActivity extends AppCompatActivity {
sub_title.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
app_version.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
navigation_bar.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
-
-
-
-
-
-
+ list_auto_refresh.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ list_auto_refresh_info.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ apk_location_info.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ apk_location.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ reset_settings.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ clear_directory_folders.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ force_auto_install.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ force_auto_install_info.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ copy_url_mode.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ copy_file_url_mode_info.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/base_font.ttf"), 1);
+ box_sub_header.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_2.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_5.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_6.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_7.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_8.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_9.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_10.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_11.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ main_box_12.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
list_menu_1.setVisibility(View.GONE);
list_menu_2.setVisibility(View.GONE);
box_5_sub_2.setVisibility(View.GONE);
box_6_sub_2.setVisibility(View.GONE);
list_menu_1.smoothScrollToPosition((int)(0));
list_menu_2.smoothScrollToPosition((int)(0));
-
-
-
-
-
-
-
-
-
-
-
-
-
+ box_support.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_donate.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_source.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_header.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF1DB954));
+ box_about_1.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_2.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_3.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_4.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_5.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_6.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_7.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF212121));
+ box_about_sub.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF2962FF));
+ box_reset_settings.setBackground(new GradientDrawable() { public GradientDrawable getIns(int a, int b) { this.setCornerRadius(a); this.setColor(b); return this; } }.getIns((int)25, 0xFF424242));
if (!ON_SCREEN.getString("ON_SCREEN", "").equals("ON_SCREEN")) {
try {
final ProgressDialog prog_0 = new ProgressDialog(MainActivity.this, ProgressDialog.THEME_DEVICE_DEFAULT_DARK);
@@ -2912,18 +3221,16 @@ public class MainActivity extends AppCompatActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
+ list_menu_1.smoothScrollToPosition((int)(999));
version_switch_1.setChecked(true);
version_switch_2.setChecked(false);
changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
}
});
}
};
- _timer.schedule(Timer, (int)(0));
- list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
- ((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
- list_menu_1.smoothScrollToPosition((int)(999));
+ _timer.schedule(Timer, (int)(300));
}
@Override
public void onCancelled(DatabaseError _databaseError) {
@@ -2944,33 +3251,35 @@ public class MainActivity extends AppCompatActivity {
_e.printStackTrace();
}
sub_3.setText(SUB_2.getString("SUB_2", ""));
+ main_refresh_layout.setRefreshing(true);
Timer = new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
+ list_menu_2.smoothScrollToPosition((int)(999));
version_switch_1.setChecked(false);
version_switch_2.setChecked(true);
changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
Timer = new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
version_switch_1.setChecked(false);
version_switch_2.setChecked(false);
changelogs_switch.setChecked(true);
+ main_body.setAlpha((float)(0.65d));
Timer = new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
+ main_refresh_layout.setRefreshing(false);
version_switch_1.setChecked(false);
version_switch_2.setChecked(false);
changelogs_switch.setChecked(false);
@@ -2980,28 +3289,82 @@ public class MainActivity extends AppCompatActivity {
});
}
};
- _timer.schedule(Timer, (int)(700));
+ _timer.schedule(Timer, (int)(900));
}
});
}
};
- _timer.schedule(Timer, (int)(700));
+ _timer.schedule(Timer, (int)(800));
}
});
}
};
- _timer.schedule(Timer, (int)(500));
- list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
- ((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
- list_menu_2.smoothScrollToPosition((int)(999));
+ _timer.schedule(Timer, (int)(800));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ xManager_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ xManager_Changelogs.addChildEventListener(_xManager_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Mod_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Version.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Version.addChildEventListener(_Version_child_listener);
}
@Override
public void onCancelled(DatabaseError _databaseError) {
}
});
- xManager_Changelogs.addChildEventListener(_xManager_Changelogs_child_listener);
- Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
- Version.addChildEventListener(_Version_child_listener);
Timer = new TimerTask() {
@Override
public void run() {
@@ -3023,6 +3386,10 @@ public class MainActivity extends AppCompatActivity {
}
};
_timer.schedule(Timer, (int)(10000));
+ main_body_optimization.setVisibility(View.VISIBLE);
+ main_scroll_settings.setVisibility(View.GONE);
+ main_scroll_about.setVisibility(View.GONE);
+ main_refresh_layout.setVisibility(View.GONE);
box_switch.setVisibility(View.GONE);
box_update.setVisibility(View.GONE);
Connection.startRequestNetwork(RequestNetworkController.GET, "https://spotify.com", "PAWN!", _Connection_request_listener);
@@ -3032,6 +3399,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
try {
+ main_refresh_layout.setRefreshing(true);
Regular_Mod.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot _dataSnapshot) {
@@ -3047,7 +3415,6 @@ public class MainActivity extends AppCompatActivity {
_e.printStackTrace();
}
sub_1.setText(SUB_1.getString("SUB_1", ""));
-
list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
main_body.setEnabled(false);
@@ -3078,7 +3445,7 @@ public class MainActivity extends AppCompatActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
-
+ main_refresh_layout.setRefreshing(false);
list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
main_body.setEnabled(true);
@@ -3154,33 +3521,217 @@ public class MainActivity extends AppCompatActivity {
}
});
main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
main_scroll_about.setVisibility(View.GONE);
- main_body_settings.setVisibility(View.GONE);
+ main_refresh_layout.setVisibility(View.VISIBLE);
box_update.setVisibility(View.VISIBLE);
box_switch.setVisibility(View.VISIBLE);
icon_update.setAlpha((float)(1.0d));
icon_switch.setAlpha((float)(1.0d));
-
Connection.startRequestNetwork(RequestNetworkController.GET, "https://spotify.com", "PAWN!", _Connection_request_listener);
_Updater();
}
catch(Exception e) {
}
}
-
-
+ main_refresh_layout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+ @Override
+ public void onRefresh() {
+ try {
+ main_body.setEnabled(false);
+ main_refresh_layout.setRefreshing(true);
+ Regular_Mod.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_1.setText(SUB_1.getString("SUB_1", ""));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ list_menu_1.smoothScrollToPosition((int)(999));
+ version_switch_1.setChecked(true);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(300));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Amoled_Black.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_3.setText(SUB_2.getString("SUB_2", ""));
+ main_refresh_layout.setRefreshing(true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ list_menu_2.smoothScrollToPosition((int)(999));
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(true);
+ changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(true);
+ main_body.setAlpha((float)(0.65d));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ main_refresh_layout.setRefreshing(false);
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(false);
+ main_body.setEnabled(true);
+ main_body.setAlpha((float)(1.0d));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(900));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(800));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(800));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ xManager_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ xManager_Changelogs.addChildEventListener(_xManager_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Mod_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Version.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Version.addChildEventListener(_Version_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Connection.startRequestNetwork(RequestNetworkController.GET, "https://spotify.com", "PAWN!", _Connection_request_listener);
+ _Animation_4();
+ }
+ catch(Exception e) {
+ }
+ }
+ });
+ apk_path_location.setText(APK_PATH.getString("PATH", ""));
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
+ Window w =MainActivity.this.getWindow();
+ w.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); w.setStatusBarColor(0xFF212121);
+ }
CHECK = 0;
_Update_Remover();
_Updater_Check();
_Animation_5();
+ _List_Updater();
_Theme_UI();
_Effects();
+ _Url_Mode();
}
- private void _Theme_UI () {
+ public void _Theme_UI () {
if (THEME.getString("THEME", "").equals("0")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF000000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3191,7 +3742,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("1")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF1DB954}));
green_switch.setChecked(true);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3202,7 +3753,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("2")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFAA00FF}));
green_switch.setChecked(false);
purple_switch.setChecked(true);
red_switch.setChecked(false);
@@ -3213,7 +3764,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("3")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFD50000}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(true);
@@ -3224,7 +3775,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("4")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF2962FF}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3235,7 +3786,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("5")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFF6D00}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3246,7 +3797,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("6")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFFFFD600}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3257,7 +3808,7 @@ public class MainActivity extends AppCompatActivity {
}
else {
if (THEME.getString("THEME", "").equals("7")) {
-
+ main_refresh_layout.setBackground(new GradientDrawable(GradientDrawable.Orientation.BR_TL,new int[] {0xFF000000,0xFF616161}));
green_switch.setChecked(false);
purple_switch.setChecked(false);
red_switch.setChecked(false);
@@ -3276,7 +3827,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Updater () {
+ public void _Updater () {
try {
Version.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
@@ -3294,29 +3845,58 @@ public class MainActivity extends AppCompatActivity {
}
Latest_Version = Versions_1.get((int)0).get("V").toString();
if (Double.parseDouble(Latest_Version) > Double.parseDouble(Current_Version)) {
- if (SketchwareUtil.getRandom((int)(0), (int)(2)) == 1) {
- _RequiredDialog(Update_Authorized, false);
- Update_Authorized.setTitle("NEW MANAGER UPDATE");
- Update_Authorized.setPositiveButton("DOWNLOAD UPDATE", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- try {
- _RequiredDialog(Update_Authorized, true);
- _Download_Update(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
- _Update_Remover();
+ _RequiredDialog(Update_Authorized, false);
+ Update_Authorized.setTitle("NEW MANAGER UPDATE");
+ Update_Authorized.setPositiveButton("DOWNLOAD UPDATE", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ try {
+ _RequiredDialog(Update_Authorized, true);
+ if (FORCE_INSTALL_UPDATE.getString("FORCE_INSTALL_UPDATE", "").equals("XX")) {
+ _Download_Update_Install(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
}
- catch(Exception e) {
+ else {
+ if (FORCE_INSTALL_UPDATE.getString("FORCE_INSTALL_UPDATE", "").equals("YY")) {
+ _Download_Update(hidden_download.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/");
+ }
}
+ _Update_Remover();
}
- });
- Update_Authorized.setNeutralButton("NOT NOW", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Update_Authorized, true);
+ catch(Exception e) {
}
- });
- Update_Authorized.create().show();
- }
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Update_Authorized.setNeutralButton("NOT NOW", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Update_Authorized, true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Update_Authorized.create().show();
}
else {
if (Double.parseDouble(Current_Version) > Double.parseDouble(Latest_Version)) {
@@ -3357,7 +3937,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Updater_Check () {
+ public void _Updater_Check () {
try {
Package_Name = "com.xc3fff0e.xmanager";
try {
@@ -3387,7 +3967,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Download_Update (final String _url, final String _path) {
+ public void _Download_Update (final String _url, final String _path) {
try {
FileUtil.makeDir(FileUtil.getPackageDataDir(getApplicationContext()));
@@ -3497,6 +4077,9 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface _dialog, int _which) {
_RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
if(android.os.Build.VERSION.SDK_INT >= 29){
@@ -3544,6 +4127,9 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface _dialog, int _which) {
_RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
Timer = new TimerTask() {
@Override
public void run() {
@@ -3581,13 +4167,13 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Effects () {
+ public void _Effects () {
_Ripple(box_update, "#9E9E9E");
_Ripple(box_switch, "#9E9E9E");
}
- private void _Ripple (final View _view, final String _c) {
+ public void _Ripple (final View _view, final String _c) {
_view.setBackground(Drawables.getSelectableDrawableFor(Color.parseColor(_c)));
_view.setClickable(true);
@@ -3796,7 +4382,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Hide_Navigation () {
+ public void _Hide_Navigation () {
try {
if (NAVIGATION_BAR.getString("NAVIGATION", "").equals("1")) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
@@ -3818,7 +4404,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Animation_0 () {
+ public void _Animation_0 () {
Animation a;
a = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
a.setDuration(200); main_box_1.startAnimation(a);
@@ -3854,27 +4440,51 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Animation_1 () {
+ public void _Animation_1 () {
Animation i;
i = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
i.setDuration(200); box_settings_close.startAnimation(i);
i = null;
Animation j;
j = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
- j.setDuration(300); main_box_7.startAnimation(j);
+ j.setDuration(600); main_box_7.startAnimation(j);
j = null;
Animation k;
k = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
- k.setDuration(400); main_box_5.startAnimation(k);
+ k.setDuration(700); main_box_5.startAnimation(k);
k = null;
Animation l;
l = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
l.setDuration(300); title_header.startAnimation(l);
l = null;
+ Animation z;
+ z = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ z.setDuration(300); main_box_8.startAnimation(z);
+ z = null;
+ Animation hh;
+ hh = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ hh.setDuration(800); main_box_9.startAnimation(hh);
+ hh = null;
+ Animation ii;
+ ii = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ ii.setDuration(900); main_box_10.startAnimation(ii);
+ ii = null;
+ Animation jj;
+ jj = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ jj.setDuration(1000); box_reset_settings.startAnimation(jj);
+ jj = null;
+ Animation kk;
+ kk = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ kk.setDuration(400); main_box_11.startAnimation(kk);
+ kk = null;
+ Animation ll;
+ ll = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
+ ll.setDuration(500); main_box_12.startAnimation(ll);
+ ll = null;
}
- private void _Animation_2 () {
+ public void _Animation_2 () {
Animation m;
m = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
m.setDuration(200); box_about_close.startAnimation(m);
@@ -3926,7 +4536,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Animation_3 () {
+ public void _Animation_3 () {
Animation aa;
aa = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
aa.setDuration(200); box_theme_0.startAnimation(aa);
@@ -3958,7 +4568,7 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Animation_4 () {
+ public void _Animation_4 () {
Animation a;
a = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
a.setDuration(200); main_box_1.startAnimation(a);
@@ -3982,14 +4592,14 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Dark_Navigation () {
+ public void _Dark_Navigation () {
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setNavigationBarColor(Color.parseColor("#212121"));
}
}
- private void _Linear_Animation (final boolean _clickanim, final double _animDuration, final View _view) {
+ public void _Linear_Animation (final boolean _clickanim, final double _animDuration, final View _view) {
_view.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
@@ -4035,11 +4645,11 @@ public class MainActivity extends AppCompatActivity {
}
- private void _Animation_5 () {
+ public void _Animation_5 () {
_Linear_Animation(true, 200, box_uninstall);
_Linear_Animation(true, 200, box_settings);
_Linear_Animation(true, 200, box_cache);
- _Linear_Animation(true, 200, icon_open);
+ _Linear_Animation(true, 200, box_open);
_Linear_Animation(true, 200, box_source);
_Linear_Animation(true, 200, box_support);
_Linear_Animation(true, 200, box_donate);
@@ -4048,6 +4658,846 @@ public class MainActivity extends AppCompatActivity {
_Linear_Animation(true, 200, box_update);
_Linear_Animation(true, 200, box_icon_close);
_Linear_Animation(true, 200, box_settings_icon_close);
+ _Linear_Animation(true, 200, main_box_10);
+ _Linear_Animation(true, 200, box_reset_settings);
+ }
+
+
+ public void _List_Updater () {
+ if (LIST_REFRESH.getString("UPDATE", "").equals("ON")) {
+ list_auto_refresh_switch.setChecked(true);
+ try {
+ main_body.setEnabled(false);
+ main_refresh_layout.setRefreshing(true);
+ Regular_Mod.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_1.setText(SUB_1.getString("SUB_1", ""));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ list_menu_1.smoothScrollToPosition((int)(999));
+ version_switch_1.setChecked(true);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(300));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Amoled_Black.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_3.setText(SUB_2.getString("SUB_2", ""));
+ main_refresh_layout.setRefreshing(true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ list_menu_2.smoothScrollToPosition((int)(999));
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(true);
+ changelogs_switch.setChecked(false);
+ main_body.setAlpha((float)(0.65d));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(true);
+ main_body.setAlpha((float)(0.65d));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ main_refresh_layout.setRefreshing(false);
+ version_switch_1.setChecked(false);
+ version_switch_2.setChecked(false);
+ changelogs_switch.setChecked(false);
+ main_body.setEnabled(true);
+ main_body.setAlpha((float)(1.0d));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(900));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(800));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(800));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ xManager_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ xManager_Changelogs.addChildEventListener(_xManager_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Mod_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Version.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Version.addChildEventListener(_Version_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Connection.startRequestNetwork(RequestNetworkController.GET, "https://spotify.com", "PAWN!", _Connection_request_listener);
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
+ main_scroll_about.setVisibility(View.GONE);
+ main_refresh_layout.setVisibility(View.VISIBLE);
+ box_update.setVisibility(View.VISIBLE);
+ box_switch.setVisibility(View.VISIBLE);
+ icon_update.setAlpha((float)(1.0d));
+ icon_switch.setAlpha((float)(1.0d));
+ }
+ catch(Exception e) {
+ }
+ }
+ else {
+ if (LIST_REFRESH.getString("UPDATE", "").equals("OFF")) {
+ list_auto_refresh_switch.setChecked(false);
+ try {
+ Regular_Mod.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_1.setText(SUB_1.getString("SUB_1", ""));
+ main_refresh_layout.setRefreshing(true);
+ list_menu_1.setAdapter(new List_menu_1Adapter(listdata));
+ ((BaseAdapter)list_menu_1.getAdapter()).notifyDataSetChanged();
+ main_body.setEnabled(false);
+ main_body.setAlpha((float)(0.65d));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Amoled_Black.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ listdata = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ listdata.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ sub_3.setText(SUB_2.getString("SUB_2", ""));
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ main_refresh_layout.setRefreshing(false);
+ list_menu_2.setAdapter(new List_menu_2Adapter(listdata));
+ ((BaseAdapter)list_menu_2.getAdapter()).notifyDataSetChanged();
+ main_body.setEnabled(true);
+ main_body.setAlpha((float)(1.0d));
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(800));
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ xManager_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ xManager_Changelogs.addChildEventListener(_xManager_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Mod_Changelogs.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Mod_Changelogs.addChildEventListener(_Mod_Changelogs_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ Version.addListenerForSingleValueEvent(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot _dataSnapshot) {
+ others = new ArrayList<>();
+ try {
+ GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {};
+ for (DataSnapshot _data : _dataSnapshot.getChildren()) {
+ HashMap<String, Object> _map = _data.getValue(_ind);
+ others.add(_map);
+ }
+ }
+ catch (Exception _e) {
+ _e.printStackTrace();
+ }
+ Version.addChildEventListener(_Version_child_listener);
+ }
+ @Override
+ public void onCancelled(DatabaseError _databaseError) {
+ }
+ });
+ main_body_optimization.setVisibility(View.GONE);
+ main_scroll_settings.setVisibility(View.GONE);
+ main_scroll_about.setVisibility(View.GONE);
+ main_refresh_layout.setVisibility(View.VISIBLE);
+ box_update.setVisibility(View.VISIBLE);
+ box_switch.setVisibility(View.VISIBLE);
+ icon_update.setAlpha((float)(1.0d));
+ icon_switch.setAlpha((float)(1.0d));
+ main_refresh_layout.setRefreshing(false);
+ Connection.startRequestNetwork(RequestNetworkController.GET, "https://spotify.com", "PAWN!", _Connection_request_listener);
+ _Updater();
+ }
+ catch(Exception e) {
+ }
+ }
+ }
+ }
+
+
+ public void _Default_Path () {
+ if (PATH.equals("")) {
+ apk_path_location.setText("/storage/emulated/0/xManager/");
+ }
+ else {
+ APK_PATH.edit().putString("PATH", apk_path_location.getText().toString()).commit();
+ }
+ }
+
+
+ public void _Download_Install (final String _url, final String _path) {
+ try {
+ FileUtil.makeDir(FileUtil.getPackageDataDir(getApplicationContext()));
+
+ android.net.ConnectivityManager connMgr = (android.net.ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
+ android.net.NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ if (networkInfo != null && networkInfo.isConnected()) {
+
+
+ final String urlDownload = _url;
+
+ DownloadManager.Request request = new DownloadManager.Request(Uri.parse(urlDownload));
+
+ final String fileName = URLUtil.guessFileName(urlDownload, null, null);
+
+ request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION);
+
+ request.setMimeType("application/vnd.android.package-archive");
+
+ request.allowScanningByMediaScanner();
+ request.setDestinationInExternalFilesDir(this,Environment.DIRECTORY_DOWNLOADS, "Spotify Mod (Official).apk");
+
+ final DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
+
+ final long downloadId = manager.enqueue(request);
+
+ final ProgressDialog prog = new ProgressDialog(this, ProgressDialog.THEME_DEVICE_DEFAULT_DARK);
+ prog.setMax(100);
+ prog.setIndeterminate(false);
+ prog.setCancelable(false);
+ prog.setCanceledOnTouchOutside(false);
+ prog.setTitle("DOWNLOADING FILE...");
+ new Thread(new Runnable() {
+
+ @Override
+ public void run() {
+
+ boolean downloading = true;
+
+ while (downloading) {
+
+ DownloadManager.Query q = new DownloadManager.Query();
+
+ q.setFilterById(downloadId);
+
+ android.database.Cursor cursor = manager.query(q);
+
+ if (cursor != null) {
+ if (cursor.moveToFirst()) {
+
+ int bytes_downloaded = cursor.getInt(cursor .getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR));
+
+ int bytes_total = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES));
+
+ if (cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)) == DownloadManager.STATUS_SUCCESSFUL) {
+
+ downloading = false;
+
+ }
+
+ if (cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)) == DownloadManager.STATUS_FAILED) {
+
+ runOnUiThread(new Runnable() {
+ public void run() {
+
+ SketchwareUtil.CustomToast(getApplicationContext(), "The file or link is currently unavailable. Please try again later.", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ });
+ prog.cancel();
+ break;
+
+ }
+
+ final int dl_progress = (int) ((bytes_downloaded * 100l) / bytes_total);
+
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ prog.setTitle("DOWNLOADING FILE...");
+ prog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+ prog.setProgress(dl_progress);
+ prog.setMax(100);
+ prog.show();
+
+ if (dl_progress == prog.getMax()) {
+
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ try {
+ FileUtil.copyFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk", apk_path_location.getText().toString().concat("Spotify Mod (Official).apk"));
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Copying failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ _RequiredDialog(Success_Download, false);
+ Success_Download.setTitle("SUCCESSFULLY DOWNLOADED");
+ Success_Download.setMessage("FILE DIRECTORY:\n<".concat(apk_path_location.getText().toString().concat(">")));
+ Success_Download.setPositiveButton("INSTALL NOW", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
+
+ if(android.os.Build.VERSION.SDK_INT >= 29){
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+ intent.setDataAndType(FileProvider.getUriForFile(MainActivity.this, "com.xc3fff0e.xmanager.provider", new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ } else {
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromFile(new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ }
+ });
+ Success_Download.setNeutralButton("LATER", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+
+ prog.cancel();
+
+ Success_Download.create().dismiss();
+
+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
+
+ if(android.os.Build.VERSION.SDK_INT >= 29){
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+ intent.setDataAndType(FileProvider.getUriForFile(MainActivity.this, "com.xc3fff0e.xmanager.provider", new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ } else {
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromFile(new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Spotify Mod (Official).apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(1500));
+ }
+ } });
+ }
+ cursor.close();
+ }
+ } } }).start();
+
+ } else {
+ SketchwareUtil.CustomToast(getApplicationContext(), "No Internet Connection", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ catch(Exception e) {
+ }
+ }
+
+
+ public void _Download_Update_Install (final String _url, final String _path) {
+ try {
+ FileUtil.makeDir(FileUtil.getPackageDataDir(getApplicationContext()));
+
+ android.net.ConnectivityManager connMgr = (android.net.ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
+ android.net.NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ if (networkInfo != null && networkInfo.isConnected()) {
+
+
+ final String urlDownload = _url;
+
+ DownloadManager.Request request = new DownloadManager.Request(Uri.parse(urlDownload));
+
+ final String fileName = URLUtil.guessFileName(urlDownload, null, null);
+
+ request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION);
+
+ request.setMimeType("application/vnd.android.package-archive");
+
+ request.allowScanningByMediaScanner();
+
+ request.setDestinationInExternalFilesDir(this,Environment.DIRECTORY_DOWNLOADS, "/Update/xManager Update.apk");
+
+ final DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
+
+ final long downloadId = manager.enqueue(request);
+
+ final ProgressDialog prog = new ProgressDialog(this, ProgressDialog.THEME_DEVICE_DEFAULT_DARK);
+ prog.setMax(100);
+ prog.setIndeterminate(false);
+ prog.setCancelable(false);
+ prog.setCanceledOnTouchOutside(false);
+ prog.setTitle("DOWNLOADING FILE...");
+ new Thread(new Runnable() {
+
+ @Override
+ public void run() {
+
+ boolean downloading = true;
+
+ while (downloading) {
+
+ DownloadManager.Query q = new DownloadManager.Query();
+
+ q.setFilterById(downloadId);
+
+ android.database.Cursor cursor = manager.query(q);
+
+ if (cursor != null) {
+ if (cursor.moveToFirst()) {
+
+ int bytes_downloaded = cursor.getInt(cursor .getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR));
+
+ int bytes_total = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES));
+
+ if (cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)) == DownloadManager.STATUS_SUCCESSFUL) {
+
+ downloading = false;
+
+ }
+
+ if (cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)) == DownloadManager.STATUS_FAILED) {
+
+ runOnUiThread(new Runnable() {
+ public void run() {
+
+ SketchwareUtil.CustomToast(getApplicationContext(), "The file or link is currently unavailable. Please try again later.", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ });
+ prog.cancel();
+ break;
+
+ }
+
+ final int dl_progress = (int) ((bytes_downloaded * 100l) / bytes_total);
+
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ prog.setTitle("DOWNLOADING FILE...");
+ prog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+ prog.setProgress(dl_progress);
+ prog.setMax(100);
+ prog.show();
+
+ if (dl_progress == prog.getMax()) {
+
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ try {
+ FileUtil.copyFile("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/xManager Update.apk", "/storage/emulated/0/xManager/Update/xManager Update.apk");
+ prog.dismiss();
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Copying failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ _RequiredDialog(Success_Download, false);
+ Success_Download.setTitle("SUCCESSFULLY DOWNLOADED");
+ Success_Download.setMessage("FILE DIRECTORY:\n</storage/emulated/0/xManager/Update/>");
+ Success_Download.setPositiveButton("INSTALL UPDATE", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
+
+ if(android.os.Build.VERSION.SDK_INT >= 29){
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+ intent.setDataAndType(FileProvider.getUriForFile(MainActivity.this, "com.xc3fff0e.xmanager.provider", new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ } else {
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromFile(new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ }
+ });
+ Success_Download.setNeutralButton("LATER", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Success_Download, true);
+
+ prog.cancel();
+
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+
+ prog.cancel();
+
+ Success_Download.create().dismiss();
+
+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build());
+
+ if(android.os.Build.VERSION.SDK_INT >= 29){
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+ intent.setDataAndType(FileProvider.getUriForFile(MainActivity.this, "com.xc3fff0e.xmanager.provider", new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+
+ } else {
+
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromFile(new File("/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/Update/xManager Update.apk")), "application/vnd.android.package-archive");
+
+ startActivity(intent);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ catch(Exception e) {
+ SketchwareUtil.CustomToast(getApplicationContext(), "Null 404: Installation failed", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(1500));
+ }
+ } });
+ }
+ cursor.close();
+ }
+ } } }).start();
+
+ } else {
+ SketchwareUtil.CustomToast(getApplicationContext(), "No Internet Connection", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
+ }
+ }
+ catch(Exception e) {
+ }
+ }
+
+
+ public void _Url_Mode () {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_ON")) {
+ copy_url_mode_switch.setChecked(true);
+ title_header.setText("xManager (UM)");
+ }
+ else {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_OFF")) {
+ copy_url_mode_switch.setChecked(false);
+ title_header.setText("xManager");
+ }
+ }
}
@@ -4072,17 +5522,17 @@ public class MainActivity extends AppCompatActivity {
return _index;
}
@Override
- public View getView(final int _position, View _view, ViewGroup _viewGroup) {
+ public View getView(final int _position, View _v, ViewGroup _container) {
LayoutInflater _inflater = (LayoutInflater)getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View _v = _view;
- if (_v == null) {
- _v = _inflater.inflate(R.layout.list_menu_1, null);
+ View _view = _v;
+ if (_view == null) {
+ _view = _inflater.inflate(R.layout.list_menu_1, null);
}
- final LinearLayout box = (LinearLayout) _v.findViewById(R.id.box);
- final TextView link = (TextView) _v.findViewById(R.id.link);
- final ImageView icon = (ImageView) _v.findViewById(R.id.icon);
- final TextView title = (TextView) _v.findViewById(R.id.title);
+ final LinearLayout box = (LinearLayout) _view.findViewById(R.id.box);
+ final TextView link = (TextView) _view.findViewById(R.id.link);
+ final ImageView icon = (ImageView) _view.findViewById(R.id.icon);
+ final TextView title = (TextView) _view.findViewById(R.id.title);
try {
title.setVisibility(View.VISIBLE);
@@ -4106,32 +5556,94 @@ public class MainActivity extends AppCompatActivity {
box.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
- _RequiredDialog(Selected_Spotify, false);
- Selected_Spotify.setTitle(title.getText().toString());
- Selected_Spotify.setMessage("You selected this modified version. Do you want to continue?");
- Selected_Spotify.setPositiveButton("CONTINUE", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Selected_Spotify, true);
- _RequiredDialog(Download_Spotify, false);
- Download_Spotify.setTitle("DOWNLOAD READY");
- Download_Spotify.setMessage("Downloading this modified apk will overwrite the previous file located at the application's external file directory.");
- Download_Spotify.setPositiveButton("DOWNLOAD", new DialogInterface.OnClickListener() {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_OFF")) {
+ _RequiredDialog(Selected_Spotify, false);
+ Selected_Spotify.setTitle(title.getText().toString());
+ Selected_Spotify.setMessage("You selected this modified version. Do you want to continue?");
+ Selected_Spotify.setPositiveButton("CONTINUE", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ _RequiredDialog(Download_Spotify, false);
+ Download_Spotify.setTitle("DOWNLOAD READY");
+ Download_Spotify.setMessage("Downloading this modified apk will overwrite the previous file located at the application's external file directory.");
+ Download_Spotify.setPositiveButton("DOWNLOAD", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ try {
+ _RequiredDialog(Download_Spotify, true);
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("X")) {
+ _Download_Install(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
+ }
+ else {
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("Y")) {
+ _Download(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
+ }
+ }
+ _File_Remover();
+ }
+ catch(Exception e) {
+ }
+ }
+ });
+ Download_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Download_Spotify, true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Download_Spotify.create().show();
+ }
+ });
+ Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Selected_Spotify.create().show();
+ FileUtil.makeDir("/storage/emulated/0/xManager");
+ FileUtil.makeDir("/storage/emulated/0/xManager/Update");
+ }
+ else {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_ON")) {
+ _RequiredDialog(Selected_Spotify, false);
+ Selected_Spotify.setTitle(title.getText().toString());
+ Selected_Spotify.setMessage("You selected this modified version. Do you want to copy the url?");
+ Selected_Spotify.setPositiveButton("COPY URL", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface _dialog, int _which) {
try {
- _RequiredDialog(Download_Spotify, true);
- _Download(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
- _File_Remover();
+ _RequiredDialog(Selected_Spotify, true);
+ ((ClipboardManager) getSystemService(getApplicationContext().CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText("clipboard", link.getText().toString()));
+ SketchwareUtil.CustomToast(getApplicationContext(), "Url copied to clipboard", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
catch(Exception e) {
}
- }
- });
- Download_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Download_Spotify, true);
Timer = new TimerTask() {
@Override
public void run() {
@@ -4146,30 +5658,29 @@ public class MainActivity extends AppCompatActivity {
_timer.schedule(Timer, (int)(100));
}
});
- Download_Spotify.create().show();
- }
- });
- Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Selected_Spotify, true);
- Timer = new TimerTask() {
+ Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
@Override
- public void run() {
- runOnUiThread(new Runnable() {
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ Timer = new TimerTask() {
@Override
public void run() {
- _Hide_Navigation();
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
}
- });
+ };
+ _timer.schedule(Timer, (int)(100));
}
- };
- _timer.schedule(Timer, (int)(100));
+ });
+ Selected_Spotify.create().show();
+ FileUtil.makeDir("/storage/emulated/0/xManager");
+ FileUtil.makeDir("/storage/emulated/0/xManager/Update");
}
- });
- Selected_Spotify.create().show();
- FileUtil.makeDir("/storage/emulated/0/xManager");
- FileUtil.makeDir("/storage/emulated/0/xManager/Update");
+ }
}
});
Animation animation;
@@ -4180,7 +5691,7 @@ public class MainActivity extends AppCompatActivity {
catch(Exception e) {
}
- return _v;
+ return _view;
}
}
@@ -4205,17 +5716,17 @@ public class MainActivity extends AppCompatActivity {
return _index;
}
@Override
- public View getView(final int _position, View _view, ViewGroup _viewGroup) {
+ public View getView(final int _position, View _v, ViewGroup _container) {
LayoutInflater _inflater = (LayoutInflater)getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View _v = _view;
- if (_v == null) {
- _v = _inflater.inflate(R.layout.list_menu_2, null);
+ View _view = _v;
+ if (_view == null) {
+ _view = _inflater.inflate(R.layout.list_menu_2, null);
}
- final LinearLayout box = (LinearLayout) _v.findViewById(R.id.box);
- final TextView link = (TextView) _v.findViewById(R.id.link);
- final ImageView icon = (ImageView) _v.findViewById(R.id.icon);
- final TextView title = (TextView) _v.findViewById(R.id.title);
+ final LinearLayout box = (LinearLayout) _view.findViewById(R.id.box);
+ final TextView link = (TextView) _view.findViewById(R.id.link);
+ final ImageView icon = (ImageView) _view.findViewById(R.id.icon);
+ final TextView title = (TextView) _view.findViewById(R.id.title);
try {
title.setVisibility(View.VISIBLE);
@@ -4239,32 +5750,94 @@ public class MainActivity extends AppCompatActivity {
box.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _view) {
- _RequiredDialog(Selected_Spotify, false);
- Selected_Spotify.setTitle(title.getText().toString());
- Selected_Spotify.setMessage("You selected this modified version. Do you want to continue?");
- Selected_Spotify.setPositiveButton("CONTINUE", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Selected_Spotify, true);
- _RequiredDialog(Download_Spotify, false);
- Download_Spotify.setTitle("DOWNLOAD READY");
- Download_Spotify.setMessage("Downloading this modified apk will overwrite the previous file located at the application's external file directory.");
- Download_Spotify.setPositiveButton("DOWNLOAD", new DialogInterface.OnClickListener() {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_OFF")) {
+ _RequiredDialog(Selected_Spotify, false);
+ Selected_Spotify.setTitle(title.getText().toString());
+ Selected_Spotify.setMessage("You selected this modified version. Do you want to continue?");
+ Selected_Spotify.setPositiveButton("CONTINUE", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ _RequiredDialog(Download_Spotify, false);
+ Download_Spotify.setTitle("DOWNLOAD READY");
+ Download_Spotify.setMessage("Downloading this modified apk will overwrite the previous file located at the application's external file directory.");
+ Download_Spotify.setPositiveButton("DOWNLOAD", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ try {
+ _RequiredDialog(Download_Spotify, true);
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("X")) {
+ _Download_Install(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
+ }
+ else {
+ if (FORCE_INSTALL.getString("FORCE_INSTALL", "").equals("Y")) {
+ _Download(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
+ }
+ }
+ _File_Remover();
+ }
+ catch(Exception e) {
+ }
+ }
+ });
+ Download_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Download_Spotify, true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Download_Spotify.create().show();
+ }
+ });
+ Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ Timer = new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
+ }
+ };
+ _timer.schedule(Timer, (int)(100));
+ }
+ });
+ Selected_Spotify.create().show();
+ FileUtil.makeDir("/storage/emulated/0/xManager");
+ FileUtil.makeDir("/storage/emulated/0/xManager/Update");
+ }
+ else {
+ if (COPY_URL_MODE.getString("COPY_URL_MODE", "").equals("URL_ON")) {
+ _RequiredDialog(Selected_Spotify, false);
+ Selected_Spotify.setTitle(title.getText().toString());
+ Selected_Spotify.setMessage("You selected this modified version. Do you want to copy the url?");
+ Selected_Spotify.setPositiveButton("COPY URL", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface _dialog, int _which) {
try {
- _RequiredDialog(Download_Spotify, true);
- _Download(link.getText().toString(), "/storage/emulated/0/Android/data/com.xc3fff0e.xmanager/files/Download/");
- _File_Remover();
+ _RequiredDialog(Selected_Spotify, true);
+ ((ClipboardManager) getSystemService(getApplicationContext().CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText("clipboard", link.getText().toString()));
+ SketchwareUtil.CustomToast(getApplicationContext(), "Url copied to clipboard", 0xFF000000, 14, 0xFFE0E0E0, 30, SketchwareUtil.BOTTOM);
}
catch(Exception e) {
}
- }
- });
- Download_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Download_Spotify, true);
Timer = new TimerTask() {
@Override
public void run() {
@@ -4279,30 +5852,29 @@ public class MainActivity extends AppCompatActivity {
_timer.schedule(Timer, (int)(100));
}
});
- Download_Spotify.create().show();
- }
- });
- Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- _RequiredDialog(Selected_Spotify, true);
- Timer = new TimerTask() {
+ Selected_Spotify.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() {
@Override
- public void run() {
- runOnUiThread(new Runnable() {
+ public void onClick(DialogInterface _dialog, int _which) {
+ _RequiredDialog(Selected_Spotify, true);
+ Timer = new TimerTask() {
@Override
public void run() {
- _Hide_Navigation();
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ _Hide_Navigation();
+ }
+ });
}
- });
+ };
+ _timer.schedule(Timer, (int)(100));
}
- };
- _timer.schedule(Timer, (int)(100));
+ });
+ Selected_Spotify.create().show();
+ FileUtil.makeDir("/storage/emulated/0/xManager");
+ FileUtil.makeDir("/storage/emulated/0/xManager/Update");
}
- });
- Selected_Spotify.create().show();
- FileUtil.makeDir("/storage/emulated/0/xManager");
- FileUtil.makeDir("/storage/emulated/0/xManager/Update");
+ }
}
});
Animation animation;
@@ -4313,7 +5885,7 @@ public class MainActivity extends AppCompatActivity {
catch(Exception e) {
}
- return _v;
+ return _view;
}
}