mirror of
https://github.com/izzy2lost/PSX2.git
synced 2026-07-05 15:18:36 -07:00
add right navi drawer quick actions
This commit is contained in:
+2
-2
@@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.izzy2lost.psx2"
|
||||
minSdk 26
|
||||
targetSdk 36
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
versionCode 2
|
||||
versionName "1.0.1"
|
||||
// APK
|
||||
setProperty("archivesBaseName","PSX2_${versionCode}_${new Date().format('yyyyMMddHHmm')}")
|
||||
|
||||
|
||||
@@ -972,7 +972,34 @@ public class GamesCoverDialogFragment extends DialogFragment {
|
||||
if (header != null) {
|
||||
android.content.SharedPreferences prefs = requireContext().getSharedPreferences("app_prefs", Context.MODE_PRIVATE);
|
||||
|
||||
// Refresh switch states only (spinners are set up once in setupDialogDrawerSettings)
|
||||
// Refresh spinner values to reflect current settings
|
||||
android.widget.Spinner spAspect = header.findViewById(R.id.drawer_sp_aspect_ratio);
|
||||
if (spAspect != null && spAspect.getAdapter() != null) {
|
||||
int savedAspect = prefs.getInt("aspect_ratio", 1);
|
||||
android.widget.ArrayAdapter<?> aspectAdapter = (android.widget.ArrayAdapter<?>) spAspect.getAdapter();
|
||||
if (savedAspect >= 0 && savedAspect < aspectAdapter.getCount()) {
|
||||
spAspect.setSelection(savedAspect);
|
||||
}
|
||||
}
|
||||
|
||||
android.widget.Spinner spScale = header.findViewById(R.id.drawer_sp_scale);
|
||||
if (spScale != null && spScale.getAdapter() != null) {
|
||||
float savedScale = prefs.getFloat("upscale_multiplier", 1.0f);
|
||||
android.widget.ArrayAdapter<?> scaleAdapter = (android.widget.ArrayAdapter<?>) spScale.getAdapter();
|
||||
int scaleIndex = Math.max(0, Math.min(scaleAdapter.getCount() - 1, Math.round(savedScale) - 1));
|
||||
spScale.setSelection(scaleIndex);
|
||||
}
|
||||
|
||||
android.widget.Spinner spBlending = header.findViewById(R.id.drawer_sp_blending_accuracy);
|
||||
if (spBlending != null && spBlending.getAdapter() != null) {
|
||||
int savedBlend = prefs.getInt("blending_accuracy", 1);
|
||||
android.widget.ArrayAdapter<?> blendAdapter = (android.widget.ArrayAdapter<?>) spBlending.getAdapter();
|
||||
if (savedBlend >= 0 && savedBlend < blendAdapter.getCount()) {
|
||||
spBlending.setSelection(savedBlend);
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh switch states
|
||||
com.google.android.material.materialswitch.MaterialSwitch swWide = header.findViewById(R.id.drawer_sw_widescreen);
|
||||
if (swWide != null) {
|
||||
swWide.setChecked(prefs.getBoolean("widescreen_patches", true));
|
||||
|
||||
@@ -466,6 +466,9 @@ public class MainActivity extends AppCompatActivity implements GamesCoverDialogF
|
||||
f.setCancelable(false);
|
||||
f.show(getSupportFragmentManager(), "setup_wizard");
|
||||
}
|
||||
|
||||
// Setup right drawer quick actions
|
||||
setupRightDrawerActions();
|
||||
}
|
||||
|
||||
public void setSetupWizardActive(boolean active) {
|
||||
@@ -1925,7 +1928,34 @@ public class MainActivity extends AppCompatActivity implements GamesCoverDialogF
|
||||
if (header != null) {
|
||||
SharedPreferences prefs = getSharedPreferences("app_prefs", MODE_PRIVATE);
|
||||
|
||||
// Refresh switch states only (spinners are set up once in setupDrawerSettings)
|
||||
// Refresh spinner values to reflect current settings
|
||||
Spinner spAspect = header.findViewById(R.id.drawer_sp_aspect_ratio);
|
||||
if (spAspect != null && spAspect.getAdapter() != null) {
|
||||
int savedAspect = prefs.getInt("aspect_ratio", 1);
|
||||
ArrayAdapter<?> aspectAdapter = (ArrayAdapter<?>) spAspect.getAdapter();
|
||||
if (savedAspect >= 0 && savedAspect < aspectAdapter.getCount()) {
|
||||
spAspect.setSelection(savedAspect);
|
||||
}
|
||||
}
|
||||
|
||||
Spinner spScale = header.findViewById(R.id.drawer_sp_scale);
|
||||
if (spScale != null && spScale.getAdapter() != null) {
|
||||
float savedScale = prefs.getFloat("upscale_multiplier", 1.0f);
|
||||
ArrayAdapter<?> scaleAdapter = (ArrayAdapter<?>) spScale.getAdapter();
|
||||
int scaleIndex = Math.max(0, Math.min(scaleAdapter.getCount() - 1, Math.round(savedScale) - 1));
|
||||
spScale.setSelection(scaleIndex);
|
||||
}
|
||||
|
||||
Spinner spBlending = header.findViewById(R.id.drawer_sp_blending_accuracy);
|
||||
if (spBlending != null && spBlending.getAdapter() != null) {
|
||||
int savedBlend = prefs.getInt("blending_accuracy", 1);
|
||||
ArrayAdapter<?> blendAdapter = (ArrayAdapter<?>) spBlending.getAdapter();
|
||||
if (savedBlend >= 0 && savedBlend < blendAdapter.getCount()) {
|
||||
spBlending.setSelection(savedBlend);
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh switch states
|
||||
com.google.android.material.materialswitch.MaterialSwitch swWide = header.findViewById(R.id.drawer_sw_widescreen);
|
||||
if (swWide != null) {
|
||||
swWide.setChecked(prefs.getBoolean("widescreen_patches", true));
|
||||
@@ -2119,4 +2149,101 @@ public class MainActivity extends AppCompatActivity implements GamesCoverDialogF
|
||||
.show();
|
||||
}
|
||||
|
||||
private void setupRightDrawerActions() {
|
||||
try {
|
||||
View rightDrawer = findViewById(R.id.end_drawer);
|
||||
if (rightDrawer != null) {
|
||||
// Games button
|
||||
View btnGames = rightDrawer.findViewById(R.id.right_drawer_btn_games);
|
||||
if (btnGames != null) {
|
||||
btnGames.setOnClickListener(v -> {
|
||||
try {
|
||||
// Close right drawer first
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
if (drawer != null) drawer.closeDrawer(androidx.core.view.GravityCompat.END);
|
||||
// Open games dialog
|
||||
openGamesDialog();
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Saves button
|
||||
View btnSaves = rightDrawer.findViewById(R.id.right_drawer_btn_saves);
|
||||
if (btnSaves != null) {
|
||||
btnSaves.setOnClickListener(v -> {
|
||||
try {
|
||||
// Close right drawer first
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
if (drawer != null) drawer.closeDrawer(androidx.core.view.GravityCompat.END);
|
||||
// Open saves dialog
|
||||
SavesDialogFragment dialog = new SavesDialogFragment();
|
||||
dialog.show(getSupportFragmentManager(), "saves_dialog");
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Exit Game button (pause + open games)
|
||||
View btnExitGame = rightDrawer.findViewById(R.id.right_drawer_btn_exit_game);
|
||||
if (btnExitGame != null) {
|
||||
btnExitGame.setOnClickListener(v -> {
|
||||
try {
|
||||
// Close right drawer first
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
if (drawer != null) drawer.closeDrawer(androidx.core.view.GravityCompat.END);
|
||||
// Pause the game first
|
||||
togglePauseState();
|
||||
// Then open games dialog after a short delay
|
||||
findViewById(android.R.id.content).postDelayed(() -> {
|
||||
openGamesDialog();
|
||||
}, 300);
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Restart Game button
|
||||
View btnRestartGame = rightDrawer.findViewById(R.id.right_drawer_btn_restart_game);
|
||||
if (btnRestartGame != null) {
|
||||
btnRestartGame.setOnClickListener(v -> {
|
||||
try {
|
||||
// Close right drawer first
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
if (drawer != null) drawer.closeDrawer(androidx.core.view.GravityCompat.END);
|
||||
// Show confirmation dialog
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setTitle("Restart Game")
|
||||
.setMessage("Restart the current game?")
|
||||
.setNegativeButton("Cancel", null)
|
||||
.setPositiveButton("Restart", (d,w) -> rebootEmu())
|
||||
.show();
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Exit App button
|
||||
View btnExitApp = rightDrawer.findViewById(R.id.right_drawer_btn_exit_app);
|
||||
if (btnExitApp != null) {
|
||||
btnExitApp.setOnClickListener(v -> {
|
||||
try {
|
||||
// Close right drawer first
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
if (drawer != null) drawer.closeDrawer(androidx.core.view.GravityCompat.END);
|
||||
// Show confirmation dialog
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setTitle("Exit App")
|
||||
.setMessage("Quit PSX2?")
|
||||
.setNegativeButton("Cancel", null)
|
||||
.setPositiveButton("Quit", (d,w) -> {
|
||||
try { NativeApp.shutdown(); } catch (Throwable ignored) {}
|
||||
finishAffinity();
|
||||
finishAndRemoveTask();
|
||||
System.exit(0);
|
||||
})
|
||||
.show();
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (Throwable ignored) {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,8 +33,10 @@ public class QuickActionsDialogFragment extends DialogFragment {
|
||||
FloatingActionButton btnPausePlay = view.findViewById(R.id.btn_quick_pause_play);
|
||||
MaterialButton btnGames = view.findViewById(R.id.btn_quick_games);
|
||||
MaterialButton btnSaves = view.findViewById(R.id.btn_quick_saves);
|
||||
MaterialButton btnExitGame = view.findViewById(R.id.btn_quick_exit_game);
|
||||
MaterialButton btnCancel = view.findViewById(R.id.btn_cancel);
|
||||
Spinner spAspect = view.findViewById(R.id.qa_sp_aspect_ratio);
|
||||
Spinner spResolution = view.findViewById(R.id.qa_sp_resolution_scale);
|
||||
Spinner spBlending = view.findViewById(R.id.qa_sp_blending_accuracy);
|
||||
MaterialSwitch swWide = view.findViewById(R.id.qa_sw_widescreen);
|
||||
MaterialSwitch swNoInt = view.findViewById(R.id.qa_sw_no_interlacing);
|
||||
@@ -133,6 +135,27 @@ public class QuickActionsDialogFragment extends DialogFragment {
|
||||
});
|
||||
}
|
||||
|
||||
// Resolution Scale spinner
|
||||
if (spResolution != null) {
|
||||
ArrayAdapter<CharSequence> scaleAdapter = ArrayAdapter.createFromResource(requireContext(),
|
||||
R.array.scale_entries, android.R.layout.simple_spinner_item);
|
||||
scaleAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
spResolution.setAdapter(scaleAdapter);
|
||||
float savedScale = requireContext().getSharedPreferences("app_prefs", android.content.Context.MODE_PRIVATE)
|
||||
.getFloat("upscale_multiplier", 1.0f);
|
||||
int scaleIndex = Math.max(0, Math.min(scaleAdapter.getCount() - 1, Math.round(savedScale) - 1));
|
||||
spResolution.setSelection(scaleIndex);
|
||||
spResolution.setOnItemSelectedListener(new android.widget.AdapterView.OnItemSelectedListener() {
|
||||
@Override public void onItemSelected(android.widget.AdapterView<?> parent, View view1, int position, long id) {
|
||||
float scale = Math.max(1, Math.min(8, position + 1));
|
||||
requireContext().getSharedPreferences("app_prefs", android.content.Context.MODE_PRIVATE)
|
||||
.edit().putFloat("upscale_multiplier", scale).apply();
|
||||
try { NativeApp.renderUpscalemultiplier(scale); } catch (Throwable ignored) {}
|
||||
}
|
||||
@Override public void onNothingSelected(android.widget.AdapterView<?> parent) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Blending Accuracy spinner
|
||||
if (spBlending != null) {
|
||||
ArrayAdapter<CharSequence> blendAdapter = ArrayAdapter.createFromResource(requireContext(),
|
||||
@@ -209,6 +232,29 @@ public class QuickActionsDialogFragment extends DialogFragment {
|
||||
});
|
||||
}
|
||||
|
||||
// Exit Game: pause game and open games dialog
|
||||
if (btnExitGame != null) {
|
||||
btnExitGame.setOnClickListener(v -> {
|
||||
try {
|
||||
// Pause the game first
|
||||
if (requireActivity() instanceof MainActivity) {
|
||||
((MainActivity) requireActivity()).togglePauseState();
|
||||
} else {
|
||||
boolean paused = NativeApp.isPaused();
|
||||
if (!paused) NativeApp.pause();
|
||||
}
|
||||
// Close this dialog
|
||||
dismissAllowingStateLoss();
|
||||
// Open games dialog after a short delay
|
||||
if (requireActivity() instanceof MainActivity) {
|
||||
requireActivity().findViewById(android.R.id.content).postDelayed(() -> {
|
||||
((MainActivity) requireActivity()).openGamesDialog();
|
||||
}, 300);
|
||||
}
|
||||
} catch (Throwable ignored) {}
|
||||
});
|
||||
}
|
||||
|
||||
// Cancel button
|
||||
if (btnCancel != null) btnCancel.setOnClickListener(v -> dismissAllowingStateLoss());
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:autoMirrored="true">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M200,840Q167,840 143.5,816.5Q120,793 120,760L120,600L200,600L200,760Q200,760 200,760Q200,760 200,760L760,760Q760,760 760,760Q760,760 760,760L760,200Q760,200 760,200Q760,200 760,200L200,200Q200,200 200,200Q200,200 200,200L200,360L120,360L120,200Q120,167 143.5,143.5Q167,120 200,120L760,120Q793,120 816.5,143.5Q840,167 840,200L840,760Q840,793 816.5,816.5Q793,840 760,840L200,840ZM420,680L364,622L466,520L120,520L120,440L466,440L364,338L420,280L620,480L420,680Z"/>
|
||||
</vector>
|
||||
@@ -1,170 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M0,0h512v512h-512z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M0,0h512v512h-512z"
|
||||
android:strokeAlpha="0.9"
|
||||
android:fillAlpha="0.9">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="0"
|
||||
android:startY="0"
|
||||
android:endX="512"
|
||||
android:endY="512"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF0B0015"/>
|
||||
<item android:offset="0.4" android:color="#FF6A00FF"/>
|
||||
<item android:offset="0.7" android:color="#FFB400FF"/>
|
||||
<item android:offset="1" android:color="#FFFF2BBB"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M0,0h512v512h-512z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:centerX="256"
|
||||
android:centerY="256"
|
||||
android:gradientRadius="384"
|
||||
android:type="radial">
|
||||
<item android:offset="0.65" android:color="#00000000"/>
|
||||
<item android:offset="1" android:color="#CC000000"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
||||
|
||||
@@ -438,10 +438,11 @@
|
||||
app:itemTextColor="@color/md_theme_onSurface"
|
||||
app:headerLayout="@layout/drawer_header_settings" />
|
||||
|
||||
<!-- Right drawer (empty content for future use) -->
|
||||
<FrameLayout
|
||||
<!-- Right drawer (Quick Actions) -->
|
||||
<include
|
||||
android:id="@+id/end_drawer"
|
||||
android:layout_width="320dp"
|
||||
layout="@layout/drawer_right_quick_actions"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
|
||||
@@ -431,10 +431,11 @@
|
||||
app:itemTextColor="@color/md_theme_onSurface"
|
||||
app:headerLayout="@layout/drawer_header_settings" />
|
||||
|
||||
<!-- Right drawer (empty content for future use) -->
|
||||
<FrameLayout
|
||||
<!-- Right drawer (Quick Actions) -->
|
||||
<include
|
||||
android:id="@+id/end_drawer"
|
||||
android:layout_width="320dp"
|
||||
layout="@layout/drawer_right_quick_actions"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_quick_games"
|
||||
@@ -139,6 +139,20 @@
|
||||
android:drawablePadding="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 3.5: Exit Game -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_quick_exit_game"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="EXIT GAME"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:drawableStart="@drawable/exit_to_app_24px"
|
||||
android:drawableTint="@color/brand_primary"
|
||||
android:drawablePadding="8dp" />
|
||||
|
||||
<!-- Row 4: Aspect Ratio -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -154,7 +168,22 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<!-- Row 5: Blending Accuracy -->
|
||||
<!-- Row 5: Resolution Scale -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Resolution Scale"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/brand_primary"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/qa_sp_resolution_scale"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<!-- Row 6: Blending Accuracy -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/colorSurface"
|
||||
android:paddingTop="32dp">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Quick Actions"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/brand_primary"
|
||||
android:gravity="center"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="24dp" />
|
||||
|
||||
<!-- Games -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/right_drawer_btn_games"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="GAMES"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:icon="@drawable/stadia_controller_24px"
|
||||
app:iconTint="@color/brand_primary"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:rippleColor="@color/brand_primary" />
|
||||
|
||||
<!-- Saves -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/right_drawer_btn_saves"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="SAVES"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:icon="@drawable/save_24px"
|
||||
app:iconTint="@color/brand_primary"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:rippleColor="@color/brand_primary" />
|
||||
|
||||
<!-- Exit Game -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/right_drawer_btn_exit_game"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="EXIT GAME"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:icon="@drawable/exit_to_app_24px"
|
||||
app:iconTint="@color/brand_primary"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:rippleColor="@color/brand_primary" />
|
||||
|
||||
<!-- Restart Game -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/right_drawer_btn_restart_game"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="RESTART GAME"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:icon="@drawable/ic_reboot"
|
||||
app:iconTint="@color/brand_primary"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:rippleColor="@color/brand_primary" />
|
||||
|
||||
<!-- Exit App -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/right_drawer_btn_exit_app"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="EXIT APP"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:icon="@drawable/exit_to_app_24px"
|
||||
app:iconTint="@android:color/holo_red_light"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="16dp"
|
||||
app:iconSize="24dp"
|
||||
app:rippleColor="@android:color/holo_red_light" />
|
||||
|
||||
<!-- Spacer to push content to top -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#000000</color>
|
||||
<color name="ic_launcher_background">#12202C</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user