1
0
Fork 1

Improve enter nickname dialog and remove notifications enabled toast on welcome screen

This commit is contained in:
Arne 2023-10-21 09:13:13 +02:00
parent 0f428ee088
commit 4f81c04a09
2 changed files with 14 additions and 4 deletions

View file

@ -109,7 +109,7 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi
ActivityResultLauncher<String> launcher = registerForActivityResult(
new ActivityResultContracts.RequestPermission(), isGranted -> {
if (isGranted) {
ToastCompat.makeText(this, R.string.notifications_enabled, ToastCompat.LENGTH_SHORT).show();
// ToastCompat.makeText(this, R.string.notifications_enabled, ToastCompat.LENGTH_SHORT).show(); // Don't always annoy the user
} else {
ToastCompat.makeText(this, R.string.notifications_disabled, ToastCompat.LENGTH_SHORT).show();
}

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
@ -37,14 +38,23 @@
android:layout_centerHorizontal="true"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_layout"
style="@style/Widget.Conversations.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/your_name"
app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
<eu.siacs.conversations.ui.widget.TextInputEditText
android:id="@+id/name"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/your_name"
android:imeOptions="flagNoExtractUi"
android:imeOptions="actionNext|flagNoExtractUi"
android:longClickable="false" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>