diff --git a/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt b/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt index eb2cb7a135..da4af6f437 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt @@ -23,6 +23,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.view.WindowManager import android.widget.PopupMenu import androidx.activity.viewModels import androidx.annotation.StringRes @@ -136,11 +137,14 @@ class ListsActivity : BaseActivity() { .setNegativeButton(android.R.string.cancel, null) .show() + dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) + binding.nameText.let { editText -> editText.doOnTextChanged { s, _, _, _ -> dialog.getButton(Dialog.BUTTON_POSITIVE).isEnabled = s?.isNotBlank() == true } editText.setText(list?.title) + editText.requestFocus() editText.text?.let { editText.setSelection(it.length) } } diff --git a/app/src/main/java/com/keylesspalace/tusky/TabPreferenceActivity.kt b/app/src/main/java/com/keylesspalace/tusky/TabPreferenceActivity.kt index 24c6ce8dd4..7cd0b8eacd 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TabPreferenceActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/TabPreferenceActivity.kt @@ -18,6 +18,7 @@ package com.keylesspalace.tusky import android.graphics.Color import android.os.Bundle import android.view.View +import android.view.WindowManager import android.widget.FrameLayout import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AlertDialog @@ -267,6 +268,7 @@ class TabPreferenceActivity : BaseActivity(), ItemInteractionListener, ListSelec dialog.show() dialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = validateHashtag(editText.text) + dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) editText.requestFocus() } diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/AddPollDialog.kt b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/AddPollDialog.kt index 3cd4b9e527..2582b5a28f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/AddPollDialog.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/AddPollDialog.kt @@ -22,6 +22,7 @@ import android.view.LayoutInflater import android.view.WindowManager import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.google.android.material.textfield.TextInputEditText import com.keylesspalace.tusky.R import com.keylesspalace.tusky.databinding.DialogAddPollBinding import com.keylesspalace.tusky.entity.NewPoll @@ -106,6 +107,14 @@ fun showAddPollDialog( dialog.show() + dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) + binding.pollChoices.post { + val firstItemView = binding.pollChoices.layoutManager?.findViewByPosition(0) + val editText = firstItemView?.findViewById(R.id.optionEditText) + editText?.requestFocus() + editText?.setSelection(editText.length()) + } + // make the dialog focusable so the keyboard does not stay behind it dialog.window?.clearFlags( WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt index 4c96bf3360..7b987ee999 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/dialog/CaptionDialog.kt @@ -62,6 +62,11 @@ class CaptionDialog : DialogFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { val imageView = binding.imageDescriptionView imageView.maxZoom = 6f + val imageDescriptionText = binding.imageDescriptionText + imageDescriptionText.post { + imageDescriptionText.requestFocus() + imageDescriptionText.setSelection(imageDescriptionText.length()) + } binding.imageDescriptionText.hint = resources.getQuantityString( R.plurals.hint_describe_for_visually_impaired, diff --git a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt index c61765bea8..e3daa6f7f4 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt @@ -3,6 +3,7 @@ package com.keylesspalace.tusky.components.filters import android.content.Context import android.content.DialogInterface.BUTTON_POSITIVE import android.os.Bundle +import android.view.WindowManager import android.widget.AdapterView import androidx.activity.viewModels import androidx.core.view.size @@ -211,7 +212,7 @@ class EditFilterActivity : BaseActivity() { private fun showAddKeywordDialog() { val binding = DialogFilterBinding.inflate(layoutInflater) binding.phraseWholeWord.isChecked = true - MaterialAlertDialogBuilder(this) + val dialog = MaterialAlertDialogBuilder(this) .setTitle(R.string.filter_keyword_addition_title) .setView(binding.root) .setPositiveButton(android.R.string.ok) { _, _ -> @@ -225,6 +226,12 @@ class EditFilterActivity : BaseActivity() { } .setNegativeButton(android.R.string.cancel, null) .show() + + dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) + + val editText = binding.phraseEditText + editText.requestFocus() + editText.setSelection(editText.length()) } private fun showEditKeywordDialog(keyword: FilterKeyword) { @@ -232,7 +239,7 @@ class EditFilterActivity : BaseActivity() { binding.phraseEditText.setText(keyword.keyword) binding.phraseWholeWord.isChecked = keyword.wholeWord - MaterialAlertDialogBuilder(this) + val dialog = MaterialAlertDialogBuilder(this) .setTitle(R.string.filter_edit_keyword_title) .setView(binding.root) .setPositiveButton(R.string.filter_dialog_update_button) { _, _ -> @@ -246,6 +253,12 @@ class EditFilterActivity : BaseActivity() { } .setNegativeButton(android.R.string.cancel, null) .show() + + dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) + + val editText = binding.phraseEditText + editText.requestFocus() + editText.setSelection(editText.length()) } private fun validateSaveButton() { diff --git a/app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsActivity.kt index 6c64048ec0..ca50fdb27c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsActivity.kt @@ -5,6 +5,7 @@ import android.content.DialogInterface import android.content.SharedPreferences import android.os.Bundle import android.util.Log +import android.view.WindowManager import android.widget.AutoCompleteTextView import androidx.activity.viewModels import androidx.fragment.app.DialogFragment @@ -194,6 +195,8 @@ class FollowedTagsActivity : showBotBadge = false ) ) + autoCompleteTextView.requestFocus() + autoCompleteTextView.setSelection(autoCompleteTextView.length()) return MaterialAlertDialogBuilder(requireActivity()) .setTitle(R.string.dialog_follow_hashtag_title) @@ -207,6 +210,11 @@ class FollowedTagsActivity : .create() } + override fun onStart() { + super.onStart() + dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) + } + companion object { fun newInstance(): FollowTagDialog = FollowTagDialog() } diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index c2114257d1..e5b9bf940b 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -723,4 +723,5 @@ محرمانگی پیش‌گزیده به فرسته‌ای که به آن پاسخ می‌دهید بستگی خواهد داشت. مستقیم تطبیق با محرمانگی پیش‌گزیدهٔ فرسته + انقضا پس از \ No newline at end of file diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index bd9895553a..32dde623b0 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -248,4 +248,4 @@ Kesalahan mengaktifkan #%1$s Gagal memuat sumber status dari server. Hashtag yang sedang tren - + \ No newline at end of file diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 1e05e8f5ec..947d5f052b 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -252,7 +252,7 @@ Mostra sempre i contenuti sensibili Media Rispondendo a @%1$s - carica altro + Carica altro Timeline pubbliche Conversazioni Aggiungi filtro @@ -267,9 +267,9 @@ Non è stato possibile creare la lista Non è stato possibile aggiornare la lista Non è stato possibile eliminare la lista - Crea una lista - Aggiorna la lista - Elimina la lista + Crea lista + Aggiorna lista + Elimina lista Cerca tra le persone che segui Aggiungi un account alla lista Rimuovi un account dalla lista @@ -738,4 +738,5 @@ La privacy preselezionata dipenderà dal post a cui stai rispondendo. Stessa privacy predefinita del post Diretto + Scade dopo \ No newline at end of file diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index eb6d4115c0..57a1c4f6dc 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -159,4 +159,4 @@ വിഡിയോ സൂചിപ്പിക്കുക നീക്കം ചെയ്യുക - + \ No newline at end of file diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index aa9947e35f..2427833487 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -127,4 +127,4 @@ Odstrániť Obľúbené Panely - + \ No newline at end of file diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 9f747f21d7..e12c613423 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -292,7 +292,7 @@ Додати фільтр Розмови Загальнодоступні стрічки - завантажити ще + Завантажити ще Відповідь для @%1$s Завжди розгортати допис, з попередженнями про вміст Підписники @@ -738,4 +738,5 @@ Відповідає типовим параметрам приватності дописів Попередньо вибрана приватність буде залежати від допису, на який ви відповідаєте. Особисті + Завершується після \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8b37b491d7..bc67598166 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -720,4 +720,5 @@ 预选隐私将取决于你回复的嘟文。 匹配默认嘟文发布隐私 私信 + 多久过期 \ No newline at end of file