From 14370925e7250c1f0f4373230ff5c5c9876d4d41 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Mon, 29 Jan 2024 18:30:23 +0530
Subject: [PATCH 01/14] used material ui in ``holder_game`` + added click
effect
---
.../app/src/main/res/layout/holder_game.xml | 24 +++++++++++++++----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/holder_game.xml b/src/pandroid/app/src/main/res/layout/holder_game.xml
index b2d46d1b4..fd14573fc 100644
--- a/src/pandroid/app/src/main/res/layout/holder_game.xml
+++ b/src/pandroid/app/src/main/res/layout/holder_game.xml
@@ -4,13 +4,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:foreground="@drawable/rounded_selectable_item_background"
+ android:focusable="true"
android:orientation="vertical"
android:padding="15dp">
-
+ android:layout_margin="10dp"
+ app:shapeAppearance="?attr/shapeAppearanceCornerLarge">
-
+
-
\ No newline at end of file
+
From 7b3861385cf00eff71babbf9ae2c252f089e796e Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Mon, 29 Jan 2024 18:37:01 +0530
Subject: [PATCH 02/14] add click effect to use in ``holder_game``
---
.../res/drawable/rounded_selectable_item_background.xml | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 src/pandroid/app/src/main/res/drawable/rounded_selectable_item_background.xml
diff --git a/src/pandroid/app/src/main/res/drawable/rounded_selectable_item_background.xml b/src/pandroid/app/src/main/res/drawable/rounded_selectable_item_background.xml
new file mode 100644
index 000000000..fad2fe967
--- /dev/null
+++ b/src/pandroid/app/src/main/res/drawable/rounded_selectable_item_background.xml
@@ -0,0 +1,9 @@
+
+ -
+
+
+
+
+
+
From d8755f58cee00c527d8c2969b4ebb74bd50085bd Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Mon, 29 Jan 2024 22:57:07 +0530
Subject: [PATCH 03/14] use material ui in ``dialog_lua_scripts``
---
.../main/res/layout/dialog_lua_scripts.xml | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/dialog_lua_scripts.xml b/src/pandroid/app/src/main/res/layout/dialog_lua_scripts.xml
index 69a9d0a46..b04848797 100644
--- a/src/pandroid/app/src/main/res/layout/dialog_lua_scripts.xml
+++ b/src/pandroid/app/src/main/res/layout/dialog_lua_scripts.xml
@@ -1,9 +1,9 @@
-
@@ -12,7 +12,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
-
-
-
+
-
\ No newline at end of file
+
From 255ab29ba2edabb982b98099513df7cb44b559b5 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Mon, 29 Jan 2024 23:00:03 +0530
Subject: [PATCH 04/14] add required imports to use material ui in
``dialog_lua_scripts``
---
.../java/com/panda3ds/pandroid/app/game/LuaDialogFragment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/LuaDialogFragment.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/LuaDialogFragment.java
index 1db9f9c76..e7da87bfb 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/LuaDialogFragment.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/LuaDialogFragment.java
@@ -12,6 +12,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
+import com.google.android.material.button.MaterialButton;
import com.panda3ds.pandroid.AlberDriver;
import com.panda3ds.pandroid.R;
@@ -182,4 +183,4 @@ private long lastModified() {
return FileUtils.getLastModified(absolutePath());
}
}
-}
\ No newline at end of file
+}
From 57efe2a0622c584cc8cb6d310f24191c319cad3b Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Tue, 30 Jan 2024 11:15:56 +0530
Subject: [PATCH 05/14] use material ui in ``holder_lua_script``
---
.../src/main/res/layout/holder_lua_script.xml | 60 ++++++++++---------
1 file changed, 33 insertions(+), 27 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/holder_lua_script.xml b/src/pandroid/app/src/main/res/layout/holder_lua_script.xml
index a1865c3f4..071d3c8cc 100644
--- a/src/pandroid/app/src/main/res/layout/holder_lua_script.xml
+++ b/src/pandroid/app/src/main/res/layout/holder_lua_script.xml
@@ -1,43 +1,50 @@
-
+ app:cardBackgroundColor="?attr/colorSurfaceVariant"
+ app:cardCornerRadius="8dp"
+ android:layout_gravity="center"
+ android:layout_margin="10dp">
-
-
-
+ android:orientation="vertical"
+ android:gravity="center"
+ android:padding="10dp">
+
+
-
+
+
+
-
-
-
\ No newline at end of file
+
From fc5d6986153e1e82242460126f5f62aaa588da61 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Tue, 30 Jan 2024 13:47:11 +0530
Subject: [PATCH 06/14] use material ui in ``fragment_game_drawer``
---
.../main/res/layout/fragment_game_drawer.xml | 23 ++++++++++---------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml b/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
index fa81a503f..e2cd045d5 100644
--- a/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
+++ b/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
@@ -1,13 +1,14 @@
-
-
-
-
+
-
-
+
-
+
-
@@ -98,8 +99,8 @@
app:menu="@menu/game_drawer_others"
android:background="?colorSurface"/>
-
+
-
\ No newline at end of file
+
From 0259eeeba5a525a2b0b329e64dd3ff9d745c8167 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Tue, 30 Jan 2024 18:50:07 +0530
Subject: [PATCH 07/14] use material ui in ``fragment_games``
---
.../src/main/res/layout/fragment_games.xml | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/fragment_games.xml b/src/pandroid/app/src/main/res/layout/fragment_games.xml
index ee69fdc8a..85f85069e 100644
--- a/src/pandroid/app/src/main/res/layout/fragment_games.xml
+++ b/src/pandroid/app/src/main/res/layout/fragment_games.xml
@@ -1,5 +1,7 @@
@@ -10,16 +12,16 @@
android:paddingStart="15dp"
android:paddingEnd="15dp"/>
-
+ android:gravity="center"
+ app:rippleColor="?colorOnSurfaceVariant"
+ app:backgroundTint="?colorPrimary"
+ tools:ignore="PrivateResource"/>
-
\ No newline at end of file
+
From 9a59547bd4e873a3cdc5742ad01a4bfdbb112234 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Fri, 2 Feb 2024 14:21:15 +0530
Subject: [PATCH 08/14] add appbar with app name + Material EditText
---
src/pandroid/app/src/main/res/layout/activity_main.xml | 10 +++++++++-
.../app/src/main/res/layout/fragment_games.xml | 1 +
.../app/src/main/res/layout/fragment_search.xml | 9 +++++----
.../src/main/res/layout/preference_simple_about.xml | 3 ++-
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/pandroid/app/src/main/res/layout/activity_main.xml b/src/pandroid/app/src/main/res/layout/activity_main.xml
index 6de640209..8ab31afd6 100644
--- a/src/pandroid/app/src/main/res/layout/activity_main.xml
+++ b/src/pandroid/app/src/main/res/layout/activity_main.xml
@@ -7,6 +7,14 @@
android:layout_height="match_parent"
tools:context=".app.MainActivity">
+
+
-
\ No newline at end of file
+
diff --git a/src/pandroid/app/src/main/res/layout/fragment_games.xml b/src/pandroid/app/src/main/res/layout/fragment_games.xml
index 85f85069e..0538aeb6b 100644
--- a/src/pandroid/app/src/main/res/layout/fragment_games.xml
+++ b/src/pandroid/app/src/main/res/layout/fragment_games.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
+ android:layout_marginTop="60dp"
android:layout_height="match_parent">
+ android:paddingHorizontal="20dp"
+ android:background="?colorSurfaceVariant">
-
@@ -46,4 +47,4 @@
-
\ No newline at end of file
+
diff --git a/src/pandroid/app/src/main/res/layout/preference_simple_about.xml b/src/pandroid/app/src/main/res/layout/preference_simple_about.xml
index 9364de36b..cf6370b9f 100644
--- a/src/pandroid/app/src/main/res/layout/preference_simple_about.xml
+++ b/src/pandroid/app/src/main/res/layout/preference_simple_about.xml
@@ -2,6 +2,7 @@
@@ -26,4 +27,4 @@
android:alpha="0.5"
android:textColor="?colorOnSurface"/>
-
\ No newline at end of file
+
From e4428c903c1fd9bb9a8b251e9604296176211cd3 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 01:11:12 +0530
Subject: [PATCH 09/14] fix drawarlayout
---
.../pandroid/app/game/DrawerFragment.java | 16 +-
.../main/res/layout/fragment_game_drawer.xml | 147 ++++++++----------
.../src/main/res/menu/game_drawer_actions.xml | 11 --
.../src/main/res/menu/game_drawer_others.xml | 7 -
.../main/res/menu/game_drawer_settings.xml | 35 +++++
5 files changed, 119 insertions(+), 97 deletions(-)
delete mode 100644 src/pandroid/app/src/main/res/menu/game_drawer_actions.xml
delete mode 100644 src/pandroid/app/src/main/res/menu/game_drawer_others.xml
create mode 100644 src/pandroid/app/src/main/res/menu/game_drawer_settings.xml
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/DrawerFragment.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/DrawerFragment.java
index bd402b525..3506e0546 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/DrawerFragment.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/game/DrawerFragment.java
@@ -12,6 +12,8 @@
import androidx.appcompat.widget.AppCompatTextView;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
+import android.content.pm.ActivityInfo;
+import android.content.res.Configuration;
import com.google.android.material.navigation.NavigationView;
import com.panda3ds.pandroid.AlberDriver;
@@ -47,7 +49,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
((AppCompatTextView)view.findViewById(R.id.game_publisher)).setText(game.getPublisher());
((NavigationView)view.findViewById(R.id.action_navigation)).setNavigationItemSelectedListener(this);
- ((NavigationView)view.findViewById(R.id.others_navigation)).setNavigationItemSelectedListener(this);
}
@Override
@@ -80,6 +81,17 @@ public void close() {
}
}
+ private void changeScreenOrientation() {
+ int currentOrientation = getResources().getConfiguration().orientation;
+
+ // Change the orientation
+ if (currentOrientation == Configuration.ORIENTATION_LANDSCAPE) {
+ requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ } else {
+ requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+ }
+}
+
@Override
public void onDrawerSlide(@NonNull View drawerView, float slideOffset) {}
@@ -106,6 +118,8 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
requireActivity().finish();
} else if (id == R.id.lua_script){
new LuaDialogFragment().show(getParentFragmentManager(), null);
+ } else if (id == R.id.change_orientation) {
+ changeScreenOrientation();
}
return false;
diff --git a/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml b/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
index e2cd045d5..c4a698eac 100644
--- a/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
+++ b/src/pandroid/app/src/main/res/layout/fragment_game_drawer.xml
@@ -1,106 +1,97 @@
-
-
+
-
-
-
-
-
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
-
-
+
+
+
+
+
+
+
+
-
-
+ android:layout_marginBottom="20dp">
+
+
+
+
+
+
-
+
+ android:orientation="vertical"
+ android:gravity="start"
+ android:layout_marginTop="195dp">
-
+ app:menu="@menu/game_drawer_settings"
+ android:background="?colorSurface"
+ android:theme="@style/Widget.App.NavigationView"
+ app:subheaderTextAppearance="@style/TextAppearanceGameDrawerSubTitle"/>
-
-
-
-
-
-
-
-
-
-
-
+
-
+
diff --git a/src/pandroid/app/src/main/res/menu/game_drawer_actions.xml b/src/pandroid/app/src/main/res/menu/game_drawer_actions.xml
deleted file mode 100644
index 9fd3264a1..000000000
--- a/src/pandroid/app/src/main/res/menu/game_drawer_actions.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/menu/game_drawer_others.xml b/src/pandroid/app/src/main/res/menu/game_drawer_others.xml
deleted file mode 100644
index b6dd48976..000000000
--- a/src/pandroid/app/src/main/res/menu/game_drawer_others.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/pandroid/app/src/main/res/menu/game_drawer_settings.xml b/src/pandroid/app/src/main/res/menu/game_drawer_settings.xml
new file mode 100644
index 000000000..12fa6d479
--- /dev/null
+++ b/src/pandroid/app/src/main/res/menu/game_drawer_settings.xml
@@ -0,0 +1,35 @@
+
From 9b0db96424d8c0a5df3bc331eab5aa240c3d9f2f Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 09:57:30 +0530
Subject: [PATCH 10/14] remove line divider from ``NavigationView``
---
src/pandroid/app/src/main/res/values/themes.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/pandroid/app/src/main/res/values/themes.xml b/src/pandroid/app/src/main/res/values/themes.xml
index 2ade71029..f37ca3683 100644
--- a/src/pandroid/app/src/main/res/values/themes.xml
+++ b/src/pandroid/app/src/main/res/values/themes.xml
@@ -26,6 +26,10 @@
+
+
-
\ No newline at end of file
+
From c6a03abf84baa3384f9e0d182380b58af9f868da Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 13:19:59 +0530
Subject: [PATCH 11/14] test daynamic colors
---
.../com/panda3ds/pandroid/app/PandroidApplication.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
index 02fbbbcc3..d066ba093 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
@@ -9,6 +9,8 @@
import com.panda3ds.pandroid.R;
import com.panda3ds.pandroid.data.config.GlobalConfig;
import com.panda3ds.pandroid.input.InputMap;
+import com.google.android.material.color.DynamicColors
+import com.google.android.material.color.DynamicColorsOptions
import com.panda3ds.pandroid.utils.GameUtils;
@@ -24,6 +26,11 @@ public void onCreate() {
GameUtils.initialize();
InputMap.initialize();
AlberDriver.Setup();
+
+ DynamicColorsOptions dynamicColorsOptions = new DynamicColorsOptions.Builder()
+ .build();
+
+ DynamicColors.applyToActivitiesIfAvailable(this, dynamicColorsOptions);
}
public static int getThemeId() {
From 863aae88dea703c4a8725646c2814954132d6f64 Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 13:44:07 +0530
Subject: [PATCH 12/14] fx
---
.../java/com/panda3ds/pandroid/app/PandroidApplication.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
index d066ba093..b9693b3a9 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
@@ -9,8 +9,8 @@
import com.panda3ds.pandroid.R;
import com.panda3ds.pandroid.data.config.GlobalConfig;
import com.panda3ds.pandroid.input.InputMap;
-import com.google.android.material.color.DynamicColors
-import com.google.android.material.color.DynamicColorsOptions
+import com.google.android.material.color.DynamicColors;
+import com.google.android.material.color.DynamicColorsOptions;
import com.panda3ds.pandroid.utils.GameUtils;
From 9eaa5400b83e71682b7ba5948c34a132256685bc Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 14:06:44 +0530
Subject: [PATCH 13/14] fx
---
.../main/java/com/panda3ds/pandroid/app/PandroidApplication.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
index b9693b3a9..66acc1fe3 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
@@ -28,6 +28,7 @@ public void onCreate() {
AlberDriver.Setup();
DynamicColorsOptions dynamicColorsOptions = new DynamicColorsOptions.Builder()
+ .setApplyToStatusBar(true)
.build();
DynamicColors.applyToActivitiesIfAvailable(this, dynamicColorsOptions);
From 17c7d7680c92b07f7585f553086b13231ae6d28f Mon Sep 17 00:00:00 2001
From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Date: Wed, 7 Feb 2024 14:30:07 +0530
Subject: [PATCH 14/14] fx
---
.../main/java/com/panda3ds/pandroid/app/PandroidApplication.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
index 66acc1fe3..b9693b3a9 100644
--- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
+++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/PandroidApplication.java
@@ -28,7 +28,6 @@ public void onCreate() {
AlberDriver.Setup();
DynamicColorsOptions dynamicColorsOptions = new DynamicColorsOptions.Builder()
- .setApplyToStatusBar(true)
.build();
DynamicColors.applyToActivitiesIfAvailable(this, dynamicColorsOptions);