Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/src/main/java/helium314/keyboard/latin/InputAttributes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import android.text.InputType
import android.view.inputmethod.EditorInfo
import helium314.keyboard.compat.AppQuirksManager
import helium314.keyboard.latin.common.Constants.ImeOption.NO_FLOATING_GESTURE_PREVIEW
import helium314.keyboard.latin.common.Constants.ImeOption.NO_PERSONALIZED_LEARNING
import helium314.keyboard.latin.common.containsValueWhenSplit
import helium314.keyboard.latin.define.DebugFlags
import helium314.keyboard.latin.utils.InputTypeUtils
Expand Down Expand Up @@ -106,7 +105,6 @@ class InputAttributes(
} else {
false
}) || AppQuirksManager.isIncognitoApp(mTargetApplicationPackageName)
|| inPrivateImeOptions(mPackageNameForPrivateImeOptions, NO_PERSONALIZED_LEARNING, editorInfo)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ object Constants {
* [helium314.keyboard.latin.settings.SettingsValues.mGestureFloatingPreviewTextEnabled]
*/
const val NO_FLOATING_GESTURE_PREVIEW = "noGestureFloatingPreview"

/**
* The private IME option used to indicate that nothing typed in a field should be learned, like
* [android.view.inputmethod.EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING] (which Compose text
* fields can't set). Used for the test field in the settings.
*/
const val NO_PERSONALIZED_LEARNING = "noPersonalizedLearning"
}

object Subtype {
Expand Down
62 changes: 0 additions & 62 deletions app/src/main/java/helium314/keyboard/settings/KeyboardTestField.kt

This file was deleted.

18 changes: 2 additions & 16 deletions app/src/main/java/helium314/keyboard/settings/SearchScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ fun SearchSettingsScreen(
title: String,
settings: List<Any?>,
headerContent: (@Composable () -> Unit)? = null,
/** a button in the top bar shows a field to try the keyboard, see [KeyboardTestField] */
testField: Boolean = false,
content: @Composable (ColumnScope.() -> Unit)? = null // overrides settings if not null
) {
val context = androidx.compose.ui.platform.LocalContext.current
Expand All @@ -87,7 +85,6 @@ fun SearchSettingsScreen(
)
},
headerContent = headerContent,
testField = testField,
content = {
if (content != null) content()
else {
Expand Down Expand Up @@ -287,15 +284,13 @@ fun <T: Any?> SearchScreen(
icon: @Composable (() -> Unit)? = null,
menu: List<Pair<String, () -> Unit>>? = null,
headerContent: (@Composable () -> Unit)? = null,
testField: Boolean = false,
content: @Composable (ColumnScope.() -> Unit)? = null,
) {
// searchText and showSearch should have the same remember or rememberSaveable
// saveable survives orientation changes and switching between screens, but shows the
// keyboard in unexpected situations such as going back from another screen, which is rather annoying
var searchText by remember { mutableStateOf(TextFieldValue()) }
var showSearch by remember { mutableStateOf(false) }
var showTestField by remember { mutableStateOf(false) }
Scaffold(contentWindowInsets = WindowInsets(0))
{ innerPadding ->
Column(Modifier.fillMaxSize().padding(innerPadding)) {
Expand All @@ -305,8 +300,7 @@ fun <T: Any?> SearchScreen(
if (!value) searchText = TextFieldValue()
}
BackHandler {
if (showTestField) showTestField = false
else if (showSearch || searchText.text.isNotEmpty()) setShowSearch(false)
if (showSearch || searchText.text.isNotEmpty()) setShowSearch(false)
else onClickBack()
}
Surface(
Expand All @@ -318,8 +312,7 @@ fun <T: Any?> SearchScreen(
windowInsets = WindowInsets(0),
navigationIcon = {
BackButton { // same as BackHandler above
if (showTestField) showTestField = false
else if (showSearch) setShowSearch(false)
if (showSearch) setShowSearch(false)
else onClickBack()
}
},
Expand All @@ -328,10 +321,6 @@ fun <T: Any?> SearchScreen(
modifier = Modifier.padding(end = 12.dp),
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically
) {
if (testField)
IconButton(onClick = { showTestField = !showTestField }) {
Icon(painterResource(R.drawable.ic_ime_switcher), stringResource(R.string.keyboard_test_field))
}
if (icon == null)
IconButton(onClick = { setShowSearch(!showSearch) }) { SearchIcon() }
else
Expand Down Expand Up @@ -372,9 +361,6 @@ fun <T: Any?> SearchScreen(
unfocusedIndicatorColor = androidx.compose.ui.graphics.Color.Transparent
)
)
// below the bar, so it doesn't scroll away with the settings
if (showTestField)
KeyboardTestField(onClose = { showTestField = false })
}
}
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyLarge) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ fun AppearanceScreen(
SearchSettingsScreen(
onClickBack = onClickBack,
title = stringResource(R.string.settings_screen_appearance),
settings = items,
testField = true,
settings = items
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ fun SuggestionsScreen(
SearchSettingsScreen(
onClickBack = onClickBack,
title = stringResource(R.string.settings_screen_suggestions),
settings = items,
testField = true,
settings = items
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ internal val currentChangelogItems = listOf(
"• Added: Text expander shortcut sorting",
"• Added: Long-press space can switch language",
"• Added: Cursor swipe distance setting",
"• Added: Try-keyboard button in settings",
"• Added: Search settings by words and word parts",
"• Changed: Toolbar folds for swipe suggestions",
"• Changed: Camera and microphone stop when unused",
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,6 @@
<string name="storage_type_language_pack">ترجمة التطبيق</string>
<string name="ocr_camera_failed">فشل تشغيل الكاميرا. اضغط لإعادة المحاولة.</string>
<string name="handwriting_not_recognized">تعذّر التعرف على الكتابة اليدوية. حاول مرة أخرى.</string>
<string name="keyboard_test_field">جرّب لوحة المفاتيح هنا</string>
<string name="keyboard_test_field_hint">تظهر التغييرات في المرة التالية التي تفتح فيها لوحة المفاتيح. لا يتم تعلّم أي شيء مكتوب هنا.</string>
<string name="cursor_swipe_step">مسافة سحب المؤشر</string>
<string name="cursor_swipe_step_summary">المسافة التي يقطعها إصبعك لكل حرف عند السحب على مفتاح المسافة أو مفتاح الحذف. كلما زادت القيمة، كان التحرك أبطأ</string>
<string name="ai_cancelled">تم إلغاء طلب الذكاء الاصطناعي</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1803,8 +1803,6 @@
<string name="storage_type_language_pack">пераклад праграмы</string>
<string name="ocr_camera_failed">Не ўдалося запусціць камеру. Націсніце, каб паўтарыць спробу.</string>
<string name="handwriting_not_recognized">Не ўдалося распазнаць рукапісны тэкст. Паспрабуйце яшчэ раз.</string>
<string name="keyboard_test_field">Паспрабуйце клавіятуру тут</string>
<string name="keyboard_test_field_hint">Змены будуць паказаны пры наступным адкрыцці клавіятуры. Тое, што набіраецца тут, не запамінаецца.</string>
<string name="cursor_swipe_step">Адлегласць свайпа курсора</string>
<string name="cursor_swipe_step_summary">Колькасць руху пальцам для кожнага знака пры свайпе па прасторы або клавішы выдалення. Больш значэнне - павольней</string>
<string name="ai_cancelled">Запыт ШІ скасаваны</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1803,8 +1803,6 @@
<string name="storage_type_language_pack">превод на приложението</string>
<string name="ocr_camera_failed">Камерата не успя да се стартира. Докоснете, за да опитате отново.</string>
<string name="handwriting_not_recognized">Ръкописният текст не можа да бъде разпознат. Опитайте отново.</string>
<string name="keyboard_test_field">Опитайте клавиатурата тук</string>
<string name="keyboard_test_field_hint">Промените се показват при следващото отваряне на клавиатурата. Нищо въведено тук не се научава.</string>
<string name="cursor_swipe_step">Разстояние на плъзгане на курсора</string>
<string name="cursor_swipe_step_summary">Разстоянието, което пръстът изминава за всеки символ при плъзгане по интервала или клавиша за изтриване. По-голямата стойност означава по-бавно</string>
<string name="ai_cancelled">Заявката към AI е отменена</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,6 @@
<string name="storage_type_language_pack">অ্যাপ অনুবাদ</string>
<string name="ocr_camera_failed">ক্যামেরা চালু করা যায়নি। আবার চেষ্টা করতে ট্যাপ করুন।</string>
<string name="handwriting_not_recognized">হাতের লেখা শনাক্ত করা যায়নি। আবার চেষ্টা করুন।</string>
<string name="keyboard_test_field">কিবোর্ড এখানে পরীক্ষা করুন</string>
<string name="keyboard_test_field_hint">পরিবর্তনগুলি পরের বার কিবোর্ড খুললে দেখা যাবে। এখানে যা টাইপ করা হয় তা শেখা হয় না।</string>
<string name="cursor_swipe_step">কার্সার সোয়াইপের দূরত্ব</string>
<string name="cursor_swipe_step_summary">স্পেস বার বা মুছুন বোতামে সোয়াইপ করার সময় প্রতিটি অক্ষরের জন্য আঙুলের চলাচলের দূরত্ব। বেশি হলে ধীর হবে</string>
<string name="ai_cancelled">AI অনুরোধ বাতিল করা হয়েছে</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1768,8 +1768,6 @@ Umožňuje lokální inferenci GGUF / llama.cpp na zařízení pro korektury a p
<string name="storage_type_language_pack">překlad aplikace</string>
<string name="ocr_camera_failed">Kameru se nepodařilo spustit. Klepnutím to zkuste znovu.</string>
<string name="handwriting_not_recognized">Rukopis se nepodařilo rozpoznat. Zkuste to znovu.</string>
<string name="keyboard_test_field">Vyzkoušejte klávesnici zde</string>
<string name="keyboard_test_field_hint">Změny se zobrazí při příštím otevření klávesnice. Nic zde napsaného se nenaučí.</string>
<string name="cursor_swipe_step">Vzdálenost posunu kurzoru</string>
<string name="cursor_swipe_step_summary">Vzdálenost prstu pro každý znak při posunu na mezerníku nebo klávese delete. Vyšší hodnota znamená pomalejší posun</string>
<string name="ai_cancelled">Požadavek AI zrušen</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@
<string name="voice" tools:keep="@string/voice">Spracheingabe</string>
<string name="theme_name_dynamic" tools:keep="@string/theme_name_dynamic">Dynamische Farben</string>
<string name="settings_screen_appearance">Aussehen</string>
<string name="keyboard_test_field">Tastatur hier ausprobieren</string>
<string name="keyboard_test_field_hint">Änderungen sind beim nächsten Öffnen der Tastatur sichtbar. Hier Getipptes wird nicht gelernt.</string>
<string name="show_popup_hints">Funktionale Hinweise anzeigen</string>
<string name="message_add_custom_layout">Datei in einem kompatiblen Format auswählen. Information zu den Formaten ist %s verfügbar.</string>
<string name="select_color_key_background">Tastenhintergrund</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,6 @@
<string name="storage_type_language_pack">μετάφραση εφαρμογής</string>
<string name="ocr_camera_failed">Η κάμερα απέτυχε να ξεκινήσει. Πατήστε για νέα προσπάθεια.</string>
<string name="handwriting_not_recognized">Δεν ήταν δυνατή η αναγνώριση του χειρόγραφου. Δοκιμάστε ξανά.</string>
<string name="keyboard_test_field">Δοκιμάστε το πληκτρολόγιο εδώ</string>
<string name="keyboard_test_field_hint">Οι αλλαγές εμφανίζονται την επόμενη φορά που θα ανοίξει το πληκτρολόγιο. Ό,τι πληκτρολογείτε εδώ δεν μαθαίνεται.</string>
<string name="cursor_swipe_step">Απόσταση σύρσιμου κέρσορα</string>
<string name="cursor_swipe_step_summary">Απόσταση δαχτύλου για κάθε χαρακτήρα κατά το σύρσιμο στο πλήκτρο διαστήματος ή διαγραφής. Μεγαλύτερη τιμή σημαίνει πιο αργή κίνηση</string>
<string name="ai_cancelled">Το αίτημα AI ακυρώθηκε</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-es-rUS/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1782,8 +1782,6 @@ Permite la inferencia GGUF / llama.cpp en el dispositivo para corrección y rees
<string name="storage_type_language_pack">traducción de la app</string>
<string name="ocr_camera_failed">Error al iniciar la cámara. Toque para reintentar.</string>
<string name="handwriting_not_recognized">No se pudo reconocer la escritura a mano. Inténtelo de nuevo.</string>
<string name="keyboard_test_field">Prueba el teclado aquí</string>
<string name="keyboard_test_field_hint">Los cambios se muestran la próxima vez que se abra el teclado. Lo que escribas aquí no se aprende.</string>
<string name="cursor_swipe_step">Distancia de deslizamiento del cursor</string>
<string name="cursor_swipe_step_summary">Recorrido del dedo por cada carácter al deslizar sobre la barra espaciadora o la tecla de borrar. Cuanto más alto, más lento</string>
<string name="ai_cancelled">Solicitud de AI cancelada</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1765,8 +1765,6 @@ Permite la inferencia GGUF / llama.cpp en el dispositivo para corrección y rees
<string name="storage_type_language_pack">traducción de la aplicación</string>
<string name="ocr_camera_failed">No se pudo iniciar la cámara. Toca para reintentar.</string>
<string name="handwriting_not_recognized">No se pudo reconocer la escritura a mano. Inténtalo de nuevo.</string>
<string name="keyboard_test_field">Pruebe el teclado aquí</string>
<string name="keyboard_test_field_hint">Los cambios se mostrarán la próxima vez que se abra el teclado. Lo que escriba aquí no se aprende.</string>
<string name="cursor_swipe_step">Distancia de deslizamiento del cursor</string>
<string name="cursor_swipe_step_summary">Recorrido del dedo por cada carácter al deslizar sobre la barra espaciadora o la tecla de borrar. Un valor más alto significa más lento</string>
<string name="ai_cancelled">Solicitud de IA cancelada</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-et/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1803,8 +1803,6 @@ Võimaldab seadmesisese GGUF / llama.cpp järelduse korrektuuri ja ümbersõnast
<string name="storage_type_language_pack">rakenduse tõlge</string>
<string name="ocr_camera_failed">Kaamera käivitamine ebaõnnestus. Puudutage uuesti proovimiseks.</string>
<string name="handwriting_not_recognized">Käekirja ei õnnestunud tuvastada. Proovige uuesti.</string>
<string name="keyboard_test_field">Proovige klaviatuuri siin</string>
<string name="keyboard_test_field_hint">Muudatused ilmuvad järgmisel klaviatuuri avamisel. Siia sisestatut ei õpita.</string>
<string name="cursor_swipe_step">Kursori libistamise vahemaa</string>
<string name="cursor_swipe_step_summary">Sõrme liikumine iga märgi kohta tühikuklahvil või kustutusklahvil libistamisel. Suurem väärtus tähendab aeglasemat liikumist</string>
<string name="ai_cancelled">AI päring tühistati</string>
Expand Down
Loading
Loading