revised settingstab and added switches for turning off or on logoanimation and haptic-feedback
This commit is contained in:
parent
b915b860c8
commit
d5463b335f
@ -1,6 +1,8 @@
|
||||
package de.jg_cody.Teraplex;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@ -8,12 +10,28 @@ import android.os.Looper;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class IntroActivity extends AppCompatActivity {
|
||||
public static boolean show_logoanimation = false;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
SharedPreferences p = getSharedPreferences("appsettings", Activity.MODE_PRIVATE);
|
||||
show_logoanimation = p.getBoolean("Logoanimation", true);
|
||||
super.onCreate(savedInstanceState);
|
||||
if (show_logoanimation) {
|
||||
|
||||
setContentView(R.layout.activity_intro);
|
||||
final Handler handler = new Handler(Looper.getMainLooper());
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//Do something after 4000ms
|
||||
Intent m = new Intent(getApplicationContext(), MainActivity.class);
|
||||
m.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(m);
|
||||
}
|
||||
}, 4000);
|
||||
} else {
|
||||
final Handler handler = new Handler(Looper.getMainLooper());
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
@ -23,8 +41,9 @@ public class IntroActivity extends AppCompatActivity {
|
||||
m.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(m);
|
||||
}
|
||||
}, 4000);
|
||||
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -81,6 +81,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
public static final int CREATE_FILE = 1;
|
||||
|
||||
public static boolean editmode = false;
|
||||
public static boolean button_vibration = false;
|
||||
|
||||
|
||||
|
||||
EditText editText_name;
|
||||
@ -116,6 +118,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
config.locale = locale;
|
||||
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
|
||||
|
||||
button_vibration = p.getBoolean("Vibration", false );
|
||||
IntroActivity.show_logoanimation = p.getBoolean("Logoanimation", true );
|
||||
|
||||
String Theme = p.getString("Theme", "RED_BLUE");
|
||||
if (Theme.equals("RED_BLUE")) {
|
||||
setTheme(R.style.Theme_red_blue);
|
||||
@ -154,9 +159,13 @@ public class MainActivity extends AppCompatActivity {
|
||||
((Switch) navigationView.getMenu().getItem(2).getActionView().findViewById(R.id.switch_editmode)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
|
||||
editmode = isChecked;
|
||||
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
|
||||
NavHostFragment nhf = (NavHostFragment) currentFragment;
|
||||
@ -177,9 +186,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
navigationView.getMenu().getItem(3).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
AlertDialog.Builder mBuilder = new AlertDialog.Builder(MainActivity.this);
|
||||
|
||||
|
||||
@ -193,9 +204,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
mBuilder.setPositiveButton(R.string.add, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
String tabname = editText_name.getText().toString().trim();
|
||||
|
||||
SharedPreferences p = getSharedPreferences("appsettings", MODE_PRIVATE);
|
||||
@ -223,10 +236,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -245,10 +260,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -259,9 +276,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
DrawerLayout mDrawerLayout;
|
||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||
@ -286,9 +305,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
mBuilder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@ -302,9 +323,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
navigationView.getMenu().getItem(4).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences p = getSharedPreferences("appsettings", MODE_PRIVATE);
|
||||
String tabsString = p.getString("tabs", null);
|
||||
List<String> tabs = new ArrayList<String>();
|
||||
@ -337,9 +360,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
mBuilder.setPositiveButton(getString(R.string.remove), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
tabs.removeAll(selectedTabs);
|
||||
SharedPreferences.Editor editor = p.edit();
|
||||
editor.putString("tabs", new JSONArray(tabs).toString());
|
||||
@ -356,10 +381,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
mBuilder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
});
|
||||
AlertDialog mDialog = mBuilder.create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
@ -385,9 +412,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
DrawerLayout mDrawerLayout;
|
||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||
@ -457,8 +486,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
public void menurighttopsettings(MenuItem i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
|
||||
NavHostFragment nhf = (NavHostFragment) currentFragment;
|
||||
nhf.getChildFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, new SettingsFragment()).commit();
|
||||
@ -466,8 +498,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public void menurighttopabout(MenuItem i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
|
||||
NavHostFragment nhf = (NavHostFragment) currentFragment;
|
||||
nhf.getChildFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, new CreditsFragment()).commit();
|
||||
@ -475,8 +510,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public void menurighttopdocumentation(MenuItem i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
AlertDialog mDialog = new AlertDialog.Builder(this)
|
||||
.setTitle(getString(R.string.menu_documentation))
|
||||
.setMessage(getString(R.string.you_will_be_redirected))
|
||||
@ -485,8 +523,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
// The dialog is automatically dismissed when a dialog button is clicked.
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.jg-cody.de/"));
|
||||
startActivity(in);
|
||||
}
|
||||
@ -496,9 +537,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
|
||||
}
|
||||
}).create();
|
||||
@ -510,8 +553,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public void menurighttopcloseapp(MenuItem i) {
|
||||
if (button_vibration) {
|
||||
Vibrator vr = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
finishAffinity();
|
||||
} else {
|
||||
@ -616,7 +662,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
finish();
|
||||
|
||||
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
@ -104,9 +104,11 @@ public class HomeFragment extends Fragment {
|
||||
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
if (userInput.getText().toString().trim().length() == 0 || ipInput.getText().toString().trim().length() == 0 || passwordInput.getText().toString().trim().length() == 0) {
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_up);
|
||||
mp.start();
|
||||
@ -119,10 +121,12 @@ public class HomeFragment extends Fragment {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -190,10 +194,12 @@ public class HomeFragment extends Fragment {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -224,9 +230,11 @@ public class HomeFragment extends Fragment {
|
||||
logoutButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
requireContext().getSharedPreferences("appsettings", Context.MODE_PRIVATE).edit().remove("ip").remove("user").remove("password").apply();
|
||||
startActivity(requireActivity().getIntent());
|
||||
requireActivity().finish();
|
||||
@ -236,9 +244,11 @@ public class HomeFragment extends Fragment {
|
||||
reboot_Button.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Vibrator vr = (Vibrator) v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_up);
|
||||
mp.start();
|
||||
AlertDialog mDialog = new AlertDialog.Builder(getContext())
|
||||
@ -249,9 +259,11 @@ public class HomeFragment extends Fragment {
|
||||
// The dialog is automatically dismissed when a dialog button is clicked.
|
||||
.setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Vibrator vr = (Vibrator) v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
try {
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_down);
|
||||
mp.start();
|
||||
@ -268,10 +280,12 @@ public class HomeFragment extends Fragment {
|
||||
.setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -284,9 +298,11 @@ public class HomeFragment extends Fragment {
|
||||
shutdown_Button.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Vibrator vr = (Vibrator) v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_up);
|
||||
mp.start();
|
||||
AlertDialog mDialog = new AlertDialog.Builder(getContext())
|
||||
@ -297,9 +313,11 @@ public class HomeFragment extends Fragment {
|
||||
// The dialog is automatically dismissed when a dialog button is clicked.
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Vibrator vr = (Vibrator) v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
try {
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_down);
|
||||
mp.start();
|
||||
@ -316,10 +334,12 @@ public class HomeFragment extends Fragment {
|
||||
.setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
|
@ -17,8 +17,10 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Switch;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@ -26,6 +28,7 @@ import androidx.fragment.app.Fragment;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import de.jg_cody.Teraplex.IntroActivity;
|
||||
import de.jg_cody.Teraplex.MainActivity;
|
||||
import de.jg_cody.Teraplex.R;
|
||||
|
||||
@ -52,9 +55,11 @@ public class SettingsFragment extends Fragment {
|
||||
Language.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
showChangeLanguageDialog();
|
||||
|
||||
}
|
||||
@ -63,9 +68,11 @@ public class SettingsFragment extends Fragment {
|
||||
Export.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
createFile();
|
||||
}
|
||||
});
|
||||
@ -73,9 +80,11 @@ public class SettingsFragment extends Fragment {
|
||||
Import.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
//showImportDialog();
|
||||
openFile();
|
||||
}
|
||||
@ -84,9 +93,11 @@ public class SettingsFragment extends Fragment {
|
||||
Reset.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.alert_error);
|
||||
mp.start();
|
||||
AlertDialog mDialog = new AlertDialog.Builder(getContext())
|
||||
@ -97,9 +108,11 @@ public class SettingsFragment extends Fragment {
|
||||
// The dialog is automatically dismissed when a dialog button is clicked.
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
try {
|
||||
requireContext().getSharedPreferences("appsettings", Context.MODE_PRIVATE).edit().clear().apply();
|
||||
startActivity(requireActivity().getIntent());
|
||||
@ -115,10 +128,12 @@ public class SettingsFragment extends Fragment {
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -130,9 +145,11 @@ public class SettingsFragment extends Fragment {
|
||||
choose_background.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
showChangeBackgroundDialog();
|
||||
|
||||
|
||||
@ -142,9 +159,11 @@ public class SettingsFragment extends Fragment {
|
||||
theme1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putString("Theme", "RED_BLUE");
|
||||
editor.apply();
|
||||
@ -158,9 +177,11 @@ public class SettingsFragment extends Fragment {
|
||||
theme2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putString("Theme", "GREEN_YELLOW");
|
||||
editor.apply();
|
||||
@ -174,9 +195,11 @@ public class SettingsFragment extends Fragment {
|
||||
theme3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putString("Theme", "ORANGE_TURQUOISE");
|
||||
editor.apply();
|
||||
@ -190,9 +213,11 @@ public class SettingsFragment extends Fragment {
|
||||
theme4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putString("Theme", "YELLOW_BLUE");
|
||||
editor.apply();
|
||||
@ -206,9 +231,11 @@ public class SettingsFragment extends Fragment {
|
||||
theme5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putString("Theme", "PINK_GREEN");
|
||||
editor.apply();
|
||||
@ -218,7 +245,36 @@ public class SettingsFragment extends Fragment {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
((Switch) root.findViewById(R.id.buttonvibration_switch)).setChecked(MainActivity.button_vibration);
|
||||
((Switch) root.findViewById(R.id.buttonvibration_switch)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
MainActivity.button_vibration = isChecked;
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putBoolean("Vibration", MainActivity.button_vibration);
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
((Switch) root.findViewById(R.id.animation_switch)).setChecked(IntroActivity.show_logoanimation);
|
||||
((Switch) root.findViewById(R.id.animation_switch)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
IntroActivity.show_logoanimation = isChecked;
|
||||
SharedPreferences.Editor editor = requireContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
|
||||
editor.putBoolean("Logoanimation", IntroActivity.show_logoanimation);
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
return root;
|
||||
}
|
||||
|
||||
@ -229,9 +285,11 @@ public class SettingsFragment extends Fragment {
|
||||
mBuilder.setSingleChoiceItems(listItems, -1, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
if (i == 0) {
|
||||
setLocale("de");
|
||||
startActivity(requireActivity().getIntent());
|
||||
@ -257,9 +315,11 @@ public class SettingsFragment extends Fragment {
|
||||
mBuilder.setSingleChoiceItems(listItems, -5, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
if (i == 0) {
|
||||
Intent a = new Intent(
|
||||
Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||
|
@ -5,6 +5,7 @@ import android.content.SharedPreferences;
|
||||
import android.os.Vibrator;
|
||||
import android.view.View;
|
||||
|
||||
import de.jg_cody.Teraplex.MainActivity;
|
||||
import de.jg_cody.Teraplex.SSH_connection;
|
||||
|
||||
public class CommandExecutor implements View.OnClickListener {
|
||||
@ -15,9 +16,11 @@ public class CommandExecutor implements View.OnClickListener {
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) v.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
SharedPreferences prefs = v.getContext().getSharedPreferences("appsettings", Context.MODE_PRIVATE);
|
||||
String user = prefs.getString("user", null);
|
||||
String password = prefs.getString("password", null);
|
||||
|
@ -20,6 +20,7 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import de.jg_cody.Teraplex.MainActivity;
|
||||
import de.jg_cody.Teraplex.R;
|
||||
|
||||
public class TerminalFragment extends Fragment {
|
||||
@ -53,10 +54,12 @@ public class TerminalFragment extends Fragment {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
}
|
||||
}).create();
|
||||
Objects.requireNonNull(mDialog.getWindow()).setBackgroundDrawableResource(R.drawable.button_round);
|
||||
mDialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation; //style id
|
||||
@ -70,7 +73,11 @@ public class TerminalFragment extends Fragment {
|
||||
send_button.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
if (MainActivity.button_vibration) {
|
||||
Vibrator vr = (Vibrator) requireContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
assert vr != null;
|
||||
vr.vibrate(100);
|
||||
}
|
||||
if (terminal != null) {
|
||||
terminal.sendTerminalCommand(terminal_edit_text.getText().toString());
|
||||
}
|
||||
|
@ -33,92 +33,75 @@
|
||||
android:id="@drawable/backgroundoverlay"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="-25dp"
|
||||
android:layout_marginStart="-17dp"
|
||||
android:layout_marginTop="-25dp"
|
||||
android:layout_marginEnd="-25dp"
|
||||
android:layout_marginEnd="-17dp"
|
||||
android:layout_marginBottom="-25dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/backgroundoverlay"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/button_export"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_red_blue"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/buttonvibration_switch"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_green_yellow"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/themes"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_theme_red_blue" />
|
||||
app:layout_constraintStart_toStartOf="@+id/button_theme_orange_turquoise"
|
||||
app:layout_constraintTop_toTopOf="@+id/themes"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/background"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/divider"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_pickimage"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_pickimage"
|
||||
app:layout_constraintVertical_bias="0.45" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/themes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/color_scheme"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/button_theme_pink_green"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_theme_red_blue"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_theme_red_blue" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sprache"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/language"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/button_language"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_language"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_language" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reset_settings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/reset_settings"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/button_reset"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_reset"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_reset" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_export"
|
||||
@ -135,97 +118,169 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/buttonvibration"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/hapticfeedback"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/introanimation2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/logoanimation"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animation_off"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/no"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/animation_switch"
|
||||
app:layout_constraintEnd_toStartOf="@+id/animation_switch"
|
||||
app:layout_constraintTop_toTopOf="@+id/animation_switch" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animation_off3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/off"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/buttonvibration_switch"
|
||||
app:layout_constraintEnd_toStartOf="@+id/buttonvibration_switch"
|
||||
app:layout_constraintTop_toTopOf="@+id/buttonvibration_switch" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animation_off2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/yes"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/animation_switch"
|
||||
app:layout_constraintStart_toEndOf="@+id/animation_switch"
|
||||
app:layout_constraintTop_toTopOf="@+id/animation_switch" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animation_off4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_horizontal|left"
|
||||
android:text="@string/on"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/mtrl_btn_text_color_selector"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/buttonvibration_switch"
|
||||
app:layout_constraintStart_toEndOf="@+id/buttonvibration_switch"
|
||||
app:layout_constraintTop_toTopOf="@+id/buttonvibration_switch" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_reset"
|
||||
android:layout_width="140dp"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_round"
|
||||
android:text="@string/button_reset"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider3" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/reset_settings" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_export"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:background="@drawable/button_round"
|
||||
android:text="@string/button_export"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_yellow_blue"
|
||||
app:layout_constraintTop_toBottomOf="@+id/import_export" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_import"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/button_round"
|
||||
android:text="@string/button_import"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/button_theme_pink_green"
|
||||
app:layout_constraintTop_toBottomOf="@+id/import_export" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_theme_red_blue"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/button_theme_red_blue"
|
||||
android:text="@string/red_blue"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button_theme_green_yellow"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/themes" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_theme_orange_turquoise"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_theme_orange_turquoise"
|
||||
android:text="@string/orange_turquoise"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button_theme_yellow_blue"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_green_yellow" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_red_blue" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_theme_yellow_blue"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_theme_yellow_blue"
|
||||
android:text="@string/yellow_blue"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button_theme_pink_green"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_orange_turquoise" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_green_yellow"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_green_yellow" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_theme_pink_green"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_theme_pink_green"
|
||||
android:text="@string/pink_green"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_yellow_blue" />
|
||||
app:layout_constraintStart_toStartOf="@+id/button_theme_orange_turquoise"
|
||||
app:layout_constraintTop_toTopOf="@+id/button_theme_yellow_blue" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_theme_green_yellow"
|
||||
@ -233,41 +288,36 @@
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_theme_green_yellow"
|
||||
android:text="@string/green_yellow"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button_theme_orange_turquoise"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_red_blue" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_language"
|
||||
android:layout_width="140dp"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_round"
|
||||
android:text="@string/language"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/divider3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sprache" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_pickimage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/button_round"
|
||||
android:text="@string/button_choose_background"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toTopOf="@+id/divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider2" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/background" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
@ -285,9 +335,9 @@
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/background_full"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_red_blue"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button_theme_yellow_blue"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/themes"
|
||||
app:layout_constraintStart_toStartOf="@+id/button_theme_pink_green"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_theme_pink_green" />
|
||||
|
||||
<View
|
||||
@ -310,6 +360,26 @@
|
||||
app:layout_constraintStart_toStartOf="@+id/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_reset" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/background_full"
|
||||
app:layout_constraintEnd_toEndOf="@+id/divider"
|
||||
app:layout_constraintStart_toStartOf="@+id/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_export" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/background_full"
|
||||
app:layout_constraintEnd_toEndOf="@+id/divider"
|
||||
app:layout_constraintStart_toStartOf="@+id/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/animation_switch" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/space"
|
||||
android:layout_width="wrap_content"
|
||||
@ -318,7 +388,25 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_export" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/buttonvibration_switch" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/buttonvibration_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/buttonvibration" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/animation_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/introanimation2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
|
@ -59,6 +59,10 @@
|
||||
<string name="import_export">IMPORT/EXPORT</string>
|
||||
<string name="filename">FILENAME</string>
|
||||
<string name="are_you_sure_to_reset">ARE YOU SURE YOU WANT TO RESET THE APP AND DELETE ALL YOUR SETTINGS?</string>
|
||||
<string name="off">OFF</string>
|
||||
<string name="on">ON</string>
|
||||
<string name="logoanimation">SHOW LOGOANIMATION</string>
|
||||
<string name="hapticfeedback">HAPTIC FEEDBACK</string>
|
||||
|
||||
//credits
|
||||
<string name="version">TERAPLEX v1.1.1</string>
|
||||
|
Loading…
Reference in New Issue
Block a user