Skip to content

Commit 3cf61a3

Browse files
Some UI Improvements, Fix Text Alignment on Some Settings
1 parent 57ef615 commit 3cf61a3

11 files changed

+58
-25
lines changed

app/src/main/java/com/micewine/emu/adapters/AdapterSettingsPreferences.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class AdapterSettingsPreferences(private val settingsList: List<SettingsListSpin
3939

4040
if (activity.getString(sList.descriptionSettings) == " ") {
4141
holder.settingsDescription.visibility = View.GONE
42-
holder.settingsName.gravity = com.google.android.material.R.id.center
4342
}
4443

4544
when (sList.type) {

app/src/main/java/com/micewine/emu/fragments/EditVirtualButtonFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class EditVirtualButtonFragment : DialogFragment() {
3131
val inflater = requireActivity().layoutInflater
3232
val view = inflater.inflate(R.layout.fragment_edit_virtual_button, null)
3333
val saveButton = view.findViewById<Button>(R.id.saveButton)
34+
val cancelButton = view.findViewById<Button>(R.id.cancelButton)
3435
val radiusSeekbarValue = view.findViewById<TextView>(R.id.radiusSeekbarValue).apply {
3536
text = "$selectedButtonRadius%"
3637
}
@@ -118,6 +119,10 @@ class EditVirtualButtonFragment : DialogFragment() {
118119
dismiss()
119120
}
120121

122+
cancelButton.setOnClickListener {
123+
dismiss()
124+
}
125+
121126
return dialog
122127
}
123128

app/src/main/java/com/micewine/emu/fragments/RenameGameItemFragment.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class RenameGameItemFragment : DialogFragment() {
2121

2222
val editTextNewName = view.findViewById<EditText>(R.id.editTextNewName)
2323
val buttonContinue = view.findViewById<Button>(R.id.buttonContinue)
24+
val buttonCancel = view.findViewById<Button>(R.id.buttonCancel)
2425

2526
val dialog = AlertDialog.Builder(requireContext(), R.style.CustomAlertDialog).setView(view).create()
2627

@@ -32,12 +33,17 @@ class RenameGameItemFragment : DialogFragment() {
3233
val newName = editTextNewName.text.toString()
3334

3435
if (newName == "") {
35-
dialog.dismiss()
36+
dismiss()
3637
}
3738

3839
renameGameFromList(preferences!!, selectedGameArray, newName)
3940

40-
dialog.dismiss()
41+
42+
dismiss()
43+
}
44+
45+
buttonCancel.setOnClickListener {
46+
dismiss()
4147
}
4248

4349
return dialog

app/src/main/res/layout/activity_welcome.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
<com.google.android.material.button.MaterialButton
2525
android:id="@+id/continueButton"
26-
style="@style/Widget.Material3.Button.TextButton"
2726
android:layout_width="0dp"
2827
android:layout_height="wrap_content"
2928
android:layout_weight="1"

app/src/main/res/layout/adapter_settings_preferences_item.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
<TextView
3131
android:id="@+id/title_preferences_model"
32-
android:layout_width="wrap_content"
33-
android:layout_height="wrap_content"
32+
android:layout_width="match_parent"
33+
android:layout_height="match_parent"
3434
android:ellipsize="marquee"
3535
android:text="Title Settings"
3636
android:textAppearance="@style/TextAppearance.AppCompat.Large"

app/src/main/res/layout/dialog_env_var.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,23 @@
4040
android:layout_width="match_parent"
4141
android:layout_height="wrap_content"
4242
android:orientation="horizontal"
43+
android:layout_marginTop="16dp"
4344
android:gravity="end">
4445

4546
<com.google.android.material.button.MaterialButton
4647
android:id="@+id/buttonCancel"
4748
style="@style/Widget.Material3.Button.TextButton"
4849
android:layout_width="wrap_content"
4950
android:layout_height="wrap_content"
50-
android:text="@string/cancel_text"/>
51+
android:text="@string/cancel_text">
52+
</com.google.android.material.button.MaterialButton>
5153

5254
<com.google.android.material.button.MaterialButton
5355
android:id="@+id/buttonSave"
54-
style="@style/Widget.Material3.Button.TextButton"
5556
android:layout_width="wrap_content"
5657
android:layout_height="wrap_content"
57-
android:text="@string/confirm_text"/>
58+
android:text="@string/confirm_text">
59+
</com.google.android.material.button.MaterialButton>
5860

5961
</LinearLayout>
6062

app/src/main/res/layout/fragment_ask_install_rat.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
<com.google.android.material.button.MaterialButton
3838
android:id="@+id/buttonContinue"
39-
style="@style/Widget.Material3.Button.TextButton"
4039
android:layout_width="0dp"
4140
android:layout_height="wrap_content"
4241
android:layout_weight="0.5"

app/src/main/res/layout/fragment_delete_game_item.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
android:layout_height="wrap_content"
66
android:orientation="vertical"
77
android:theme="@style/Theme.MiceWine"
8-
android:padding="24dp">
8+
android:padding="16dp">
99

1010
<TextView
1111
android:layout_width="match_parent"
1212
android:layout_height="wrap_content"
1313
android:text="@string/remove_game_item_warning"
14-
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
1514
android:textAlignment="center"
15+
android:textSize="20sp"
16+
android:textStyle="bold"
1617
android:layout_marginBottom="16dp"/>
1718

1819
<LinearLayout
@@ -31,7 +32,6 @@
3132

3233
<com.google.android.material.button.MaterialButton
3334
android:id="@+id/buttonContinue"
34-
style="@style/Widget.Material3.Button.TextButton"
3535
android:layout_width="wrap_content"
3636
android:layout_height="wrap_content"
3737
android:text="@string/confirm_text"/>

app/src/main/res/layout/fragment_edit_virtual_button.xml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,30 @@
140140

141141
</LinearLayout>
142142

143-
<com.google.android.material.button.MaterialButton
144-
android:id="@+id/saveButton"
145-
style="@style/Widget.Material3.Button.TextButton"
146-
android:layout_marginTop="10dp"
143+
<LinearLayout
147144
android:layout_width="match_parent"
148145
android:layout_height="wrap_content"
149-
android:text="@string/save_text">
150-
</com.google.android.material.button.MaterialButton>
146+
android:orientation="horizontal"
147+
android:gravity="end">
148+
149+
<com.google.android.material.button.MaterialButton
150+
android:id="@+id/cancelButton"
151+
android:layout_marginTop="10dp"
152+
style="@style/Widget.Material3.Button.TextButton"
153+
android:layout_width="wrap_content"
154+
android:layout_height="wrap_content"
155+
android:text="@string/cancel_text">
156+
</com.google.android.material.button.MaterialButton>
157+
158+
<com.google.android.material.button.MaterialButton
159+
android:id="@+id/saveButton"
160+
android:layout_marginTop="10dp"
161+
android:layout_width="wrap_content"
162+
android:layout_height="wrap_content"
163+
android:text="@string/save_text">
164+
</com.google.android.material.button.MaterialButton>
165+
166+
</LinearLayout>
151167

152168
</LinearLayout>
153169

app/src/main/res/layout/fragment_info.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
<com.google.android.material.button.MaterialButton
3636
android:id="@+id/okButton"
37-
style="@style/Widget.Material3.Button.TextButton"
3837
android:layout_marginTop="18dp"
3938
android:layout_width="match_parent"
4039
android:layout_height="wrap_content">

0 commit comments

Comments
 (0)