Fix dialogs design

This commit is contained in:
Ivan Agosto 2024-04-05 21:30:22 -06:00
parent f0b5ba10e8
commit 2ffb7daede
4 changed files with 13 additions and 17 deletions

View File

@ -74,6 +74,7 @@ class LoginActivity : AppCompatActivity() {
val inputTwoFactor = dialog.findViewById<EditText>(R.id.twoFactorText) val inputTwoFactor = dialog.findViewById<EditText>(R.id.twoFactorText)
builder.setView(dialog) builder.setView(dialog)
.setTitle(R.string.twoFactorLabel)
// Add action buttons // Add action buttons
.setPositiveButton(R.string.loginBtn) { d, _ -> .setPositiveButton(R.string.loginBtn) { d, _ ->
this.optCode = inputTwoFactor.text.toString() this.optCode = inputTwoFactor.text.toString()

View File

@ -318,6 +318,7 @@ class ReproductorActivity : AppCompatActivity() {
// Inflate and set the layout for the dialog // Inflate and set the layout for the dialog
// Pass null as the parent view because its going in the dialog layout // Pass null as the parent view because its going in the dialog layout
builder.setView(dialog) builder.setView(dialog)
.setTitle(R.string.reportDialog)
// Add action buttons // Add action buttons
.setPositiveButton(R.string.reportBtn) { _, _ -> .setPositiveButton(R.string.reportBtn) { _, _ ->
val reason = inputReason.text.toString() val reason = inputReason.text.toString()

View File

@ -1,25 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root" android:id="@+id/layout_root"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" > android:padding="10dp" >
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_margin="4dp" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
android:layout_weight="3"
android:hint="@string/reportDialog">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/reportText" android:id="@+id/reportText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textMultiLine" > android:inputType="textMultiLine" >
<requestFocus /> <requestFocus />
</com.google.android.material.textfield.TextInputEditText> </com.google.android.material.textfield.TextInputEditText>

View File

@ -1,23 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp" > android:padding="10dp" >
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_margin="4dp" android:layout_margin="0dp"
android:layout_weight="3" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
android:hint="@string/twoFactorLabel">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/twoFactorText" android:id="@+id/twoFactorText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:inputType="textMultiLine" >
<requestFocus /> <requestFocus />
@ -25,6 +24,4 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>