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)
builder.setView(dialog)
.setTitle(R.string.twoFactorLabel)
// Add action buttons
.setPositiveButton(R.string.loginBtn) { d, _ ->
this.optCode = inputTwoFactor.text.toString()

View File

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

View File

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

View File

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