From 33ab62be22185f8e009f65e45205363125563cbc Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 24 Dec 2022 21:20:59 +0100 Subject: [PATCH] updating commons and adding greek language --- app/build.gradle | 2 +- .../keyboard/adapters/ClipsKeyboardAdapter.kt | 4 ++-- .../com/simplemobiletools/keyboard/extensions/Context.kt | 2 ++ .../com/simplemobiletools/keyboard/helpers/Constants.kt | 1 + .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 1 + app/src/main/res/layout/item_section_label.xml | 2 +- build.gradle | 2 +- 7 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 414f8d50..c5feca19 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,7 +65,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:9162225f33' + implementation 'com.github.SimpleMobileTools:Simple-Commons:6323be1fd7' implementation 'androidx.emoji2:emoji2-bundled:1.2.0' kapt 'androidx.room:room-compiler:2.4.3' diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt index adc1b4b7..deaec350 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt @@ -91,7 +91,7 @@ class ClipsKeyboardAdapter( if (sectionLabel.isCurrent) { setOnLongClickListener { context.toast(R.string.pin_text); true; } - setImageDrawable(resources.getDrawable(R.drawable.ic_pin)) + setImageDrawable(resources.getDrawable(R.drawable.ic_pin_vector)) setOnClickListener { ensureBackgroundThread { val currentClip = context.getCurrentClip() ?: return@ensureBackgroundThread @@ -105,7 +105,7 @@ class ClipsKeyboardAdapter( } } } else { - setImageDrawable(resources.getDrawable(R.drawable.ic_pin_filled)) + setImageDrawable(resources.getDrawable(R.drawable.ic_pin_filled_vector)) background = null // avoid doing any animations on clicking clipboard_manager_holder } } diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/extensions/Context.kt index 55d9aa93..855438d6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/extensions/Context.kt @@ -157,6 +157,7 @@ fun Context.getKeyboardLanguages(): ArrayList { RadioItem(LANGUAGE_ENGLISH_DVORAK, getKeyboardLanguageText(LANGUAGE_ENGLISH_DVORAK)), RadioItem(LANGUAGE_FRENCH, getKeyboardLanguageText(LANGUAGE_FRENCH)), RadioItem(LANGUAGE_GERMAN, getKeyboardLanguageText(LANGUAGE_GERMAN)), + RadioItem(LANGUAGE_GREEK, getKeyboardLanguageText(LANGUAGE_GREEK)), RadioItem(LANGUAGE_LITHUANIAN, getKeyboardLanguageText(LANGUAGE_LITHUANIAN)), RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)), RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)), @@ -174,6 +175,7 @@ fun Context.getKeyboardLanguageText(language: Int): String { LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)" LANGUAGE_FRENCH -> getString(R.string.translation_french) LANGUAGE_GERMAN -> getString(R.string.translation_german) + LANGUAGE_GREEK -> getString(R.string.translation_greek) LANGUAGE_LITHUANIAN -> getString(R.string.translation_lithuanian) LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian) LANGUAGE_RUSSIAN -> getString(R.string.translation_russian) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt index 42b8eea4..b2b4f21e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt @@ -31,6 +31,7 @@ const val LANGUAGE_BULGARIAN = 9 const val LANGUAGE_TURKISH_Q = 10 const val LANGUAGE_LITHUANIAN = 11 const val LANGUAGE_BENGALI = 12 +const val LANGUAGE_GREEK = 13 // keyboard height multiplier options const val KEYBOARD_HEIGHT_MULTIPLIER_SMALL = 1 diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index 41309e43..b25b5860 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -265,6 +265,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL LANGUAGE_ENGLISH_QWERTZ -> R.xml.keys_letters_english_qwertz LANGUAGE_FRENCH -> R.xml.keys_letters_french LANGUAGE_GERMAN -> R.xml.keys_letters_german + LANGUAGE_GREEK -> R.xml.keys_letters_greek LANGUAGE_LITHUANIAN -> R.xml.keys_letters_lithuanian LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian diff --git a/app/src/main/res/layout/item_section_label.xml b/app/src/main/res/layout/item_section_label.xml index c6891761..28bd925b 100644 --- a/app/src/main/res/layout/item_section_label.xml +++ b/app/src/main/res/layout/item_section_label.xml @@ -22,6 +22,6 @@ android:alpha="0.8" android:background="?android:attr/selectableItemBackgroundBorderless" android:padding="@dimen/small_margin" - android:src="@drawable/ic_pin" /> + android:src="@drawable/ic_pin_vector" /> diff --git a/build.gradle b/build.gradle index a0df21a6..c9c1902c 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:7.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong