diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/ui/edit/ContactDiaryEditPersonsFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/ui/edit/ContactDiaryEditPersonsFragment.kt index cc8a3c514ef..e3faf79896f 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/ui/edit/ContactDiaryEditPersonsFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/ui/edit/ContactDiaryEditPersonsFragment.kt @@ -51,7 +51,6 @@ class ContactDiaryEditPersonsFragment : Fragment(R.layout.contact_diary_edit_per } viewModel.navigationEvent.observe2(this) { - when (it) { ShowDeletionConfirmationDialog -> DialogHelper.showDialog(deleteAllPersonsConfirmationDialog) is ShowPersonDetailFragment -> { diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/util/ContactDiaryExtensions.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/util/ContactDiaryExtensions.kt index f09c9babde3..66ec8195fdc 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/util/ContactDiaryExtensions.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/util/ContactDiaryExtensions.kt @@ -4,6 +4,7 @@ import android.content.Context import android.os.Build import android.view.View import android.view.inputmethod.InputMethodManager +import android.widget.EditText import androidx.core.view.AccessibilityDelegateCompat import androidx.core.view.ViewCompat import androidx.core.view.accessibility.AccessibilityNodeInfoCompat @@ -43,11 +44,11 @@ fun LocalDate.toFormattedDayForAccessibility(locale: Locale): String { DateTimeFormat.longDate().withLocale(locale).print(this) } -fun View.focusAndShowKeyboard() { +fun EditText.focusAndShowKeyboard() { /** * This is to be called when the window already has focus. */ - fun View.showTheKeyboardNow() { + fun EditText.showTheKeyboardNow() { if (isFocused) { post { val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager @@ -57,6 +58,7 @@ fun View.focusAndShowKeyboard() { } requestFocus() + this.setSelection(this.text.length) if (hasWindowFocus()) { showTheKeyboardNow() } diff --git a/Corona-Warn-App/src/main/res/layout/contact_diary_add_location_fragment.xml b/Corona-Warn-App/src/main/res/layout/contact_diary_add_location_fragment.xml index f51cd280b1a..36df6ecdea2 100644 --- a/Corona-Warn-App/src/main/res/layout/contact_diary_add_location_fragment.xml +++ b/Corona-Warn-App/src/main/res/layout/contact_diary_add_location_fragment.xml @@ -4,6 +4,7 @@ android:layout_height="match_parent" android:background="@color/colorBackground" android:fillViewport="true" + android:fitsSystemWindows="true" android:transitionName="contact_diary_shared_content"> + + + +