mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-04-14 10:22:06 +02:00
Merge pull request #227 from fatihergin/feature/viewbinding-and-sdk-34-migration
Feature/viewbinding and sdk 34 migration
This commit is contained in:
commit
60912ca721
@ -1,6 +1,5 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
|
||||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
@ -10,12 +9,13 @@ if (keystorePropertiesFile.exists()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 33
|
namespace "com.simplemobiletools.keyboard"
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.keyboard"
|
applicationId "com.simplemobiletools.keyboard"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 33
|
targetSdk 34
|
||||||
versionCode 22
|
versionCode 22
|
||||||
versionName "5.4.7"
|
versionName "5.4.7"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@ -34,6 +34,11 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig true
|
||||||
|
viewBinding true
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
@ -47,7 +52,16 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "variants"
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '17'
|
||||||
|
}
|
||||||
|
|
||||||
|
flavorDimensions = ["variants"]
|
||||||
productFlavors {
|
productFlavors {
|
||||||
core {}
|
core {}
|
||||||
fdroid {}
|
fdroid {}
|
||||||
@ -65,7 +79,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:2d4e07e5f4'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:0e173dc5ad'
|
||||||
implementation 'androidx.emoji2:emoji2-bundled:1.2.0'
|
implementation 'androidx.emoji2:emoji2-bundled:1.2.0'
|
||||||
implementation 'androidx.autofill:autofill:1.1.0'
|
implementation 'androidx.autofill:autofill:1.1.0'
|
||||||
|
|
||||||
|
@ -12,28 +12,32 @@ import com.simplemobiletools.commons.helpers.LICENSE_GSON
|
|||||||
import com.simplemobiletools.commons.models.FAQItem
|
import com.simplemobiletools.commons.models.FAQItem
|
||||||
import com.simplemobiletools.keyboard.BuildConfig
|
import com.simplemobiletools.keyboard.BuildConfig
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import com.simplemobiletools.keyboard.databinding.ActivityMainBinding
|
||||||
|
|
||||||
class MainActivity : SimpleActivity() {
|
class MainActivity : SimpleActivity() {
|
||||||
|
private val binding by viewBinding(ActivityMainBinding::inflate)
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
isMaterialActivity = true
|
isMaterialActivity = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(binding.root)
|
||||||
appLaunched(BuildConfig.APPLICATION_ID)
|
appLaunched(BuildConfig.APPLICATION_ID)
|
||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
refreshMenuItems()
|
refreshMenuItems()
|
||||||
|
|
||||||
updateMaterialActivityViews(main_coordinator, main_holder, useTransparentNavigation = false, useTopSearchMenu = false)
|
binding.apply {
|
||||||
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
|
updateMaterialActivityViews(mainCoordinator, mainHolder, useTransparentNavigation = false, useTopSearchMenu = false)
|
||||||
|
setupMaterialScrollListener(mainNestedScrollview, mainToolbar)
|
||||||
|
|
||||||
change_keyboard_holder.setOnClickListener {
|
changeKeyboardHolder.setOnClickListener {
|
||||||
(getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager).showInputMethodPicker()
|
(getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager).showInputMethodPicker()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
setupToolbar(main_toolbar)
|
setupToolbar(binding.mainToolbar)
|
||||||
if (!isKeyboardEnabled()) {
|
if (!isKeyboardEnabled()) {
|
||||||
ConfirmationAdvancedDialog(this, messageId = R.string.redirection_note, positive = R.string.ok, negative = 0) { success ->
|
ConfirmationAdvancedDialog(this, messageId = R.string.redirection_note, positive = R.string.ok, negative = 0) { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
@ -47,12 +51,12 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTextColors(main_nested_scrollview)
|
updateTextColors(binding.mainNestedScrollview)
|
||||||
updateChangeKeyboardColor()
|
updateChangeKeyboardColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOptionsMenu() {
|
private fun setupOptionsMenu() {
|
||||||
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
binding.mainToolbar.setOnMenuItemClickListener { menuItem ->
|
||||||
when (menuItem.itemId) {
|
when (menuItem.itemId) {
|
||||||
R.id.more_apps_from_us -> launchMoreAppsFromUsIntent()
|
R.id.more_apps_from_us -> launchMoreAppsFromUsIntent()
|
||||||
R.id.settings -> launchSettings()
|
R.id.settings -> launchSettings()
|
||||||
@ -64,7 +68,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun refreshMenuItems() {
|
private fun refreshMenuItems() {
|
||||||
main_toolbar.menu.apply {
|
binding.mainToolbar.menu.apply {
|
||||||
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,8 +93,10 @@ class MainActivity : SimpleActivity() {
|
|||||||
private fun updateChangeKeyboardColor() {
|
private fun updateChangeKeyboardColor() {
|
||||||
val applyBackground = resources.getDrawable(R.drawable.button_background_rounded, theme) as RippleDrawable
|
val applyBackground = resources.getDrawable(R.drawable.button_background_rounded, theme) as RippleDrawable
|
||||||
(applyBackground as LayerDrawable).findDrawableByLayerId(R.id.button_background_holder).applyColorFilter(getProperPrimaryColor())
|
(applyBackground as LayerDrawable).findDrawableByLayerId(R.id.button_background_holder).applyColorFilter(getProperPrimaryColor())
|
||||||
change_keyboard.background = applyBackground
|
binding.changeKeyboard.apply {
|
||||||
change_keyboard.setTextColor(getProperPrimaryColor().getContrastColor())
|
background = applyBackground
|
||||||
|
setTextColor(getProperPrimaryColor().getContrastColor())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isKeyboardEnabled(): Boolean {
|
private fun isKeyboardEnabled(): Boolean {
|
||||||
|
@ -13,45 +13,51 @@ import com.simplemobiletools.commons.helpers.*
|
|||||||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
import com.simplemobiletools.keyboard.adapters.ClipsActivityAdapter
|
import com.simplemobiletools.keyboard.adapters.ClipsActivityAdapter
|
||||||
|
import com.simplemobiletools.keyboard.databinding.ActivityManageClipboardItemsBinding
|
||||||
import com.simplemobiletools.keyboard.dialogs.AddOrEditClipDialog
|
import com.simplemobiletools.keyboard.dialogs.AddOrEditClipDialog
|
||||||
import com.simplemobiletools.keyboard.dialogs.ExportClipsDialog
|
import com.simplemobiletools.keyboard.dialogs.ExportClipsDialog
|
||||||
import com.simplemobiletools.keyboard.extensions.clipsDB
|
import com.simplemobiletools.keyboard.extensions.clipsDB
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
import kotlinx.android.synthetic.main.activity_manage_clipboard_items.*
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.io.OutputStream
|
import java.io.OutputStream
|
||||||
|
|
||||||
class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||||
private val PICK_EXPORT_CLIPS_INTENT = 21
|
companion object {
|
||||||
private val PICK_IMPORT_CLIPS_SOURCE_INTENT = 22
|
private const val PICK_EXPORT_CLIPS_INTENT = 21
|
||||||
|
private const val PICK_IMPORT_CLIPS_SOURCE_INTENT = 22
|
||||||
|
}
|
||||||
|
|
||||||
|
private val binding by viewBinding(ActivityManageClipboardItemsBinding::inflate)
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
isMaterialActivity = true
|
isMaterialActivity = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_manage_clipboard_items)
|
setContentView(binding.root)
|
||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
updateTextColors(suggestions_items_holder)
|
updateTextColors(binding.suggestionsItemsHolder)
|
||||||
updateClips()
|
updateClips()
|
||||||
|
|
||||||
updateMaterialActivityViews(clipboard_coordinator, clipboard_items_list, useTransparentNavigation = true, useTopSearchMenu = false)
|
binding.apply {
|
||||||
setupMaterialScrollListener(clipboard_nested_scrollview, clipboard_toolbar)
|
updateMaterialActivityViews(clipboardCoordinator, clipboardItemsList, useTransparentNavigation = true, useTopSearchMenu = false)
|
||||||
|
setupMaterialScrollListener(clipboardNestedScrollview, clipboardToolbar)
|
||||||
|
|
||||||
clipboard_items_placeholder.text = "${getText(R.string.manage_clipboard_empty)}\n\n${getText(R.string.manage_clips)}"
|
clipboardItemsPlaceholder.text = "${getText(R.string.manage_clipboard_empty)}\n\n${getText(R.string.manage_clips)}"
|
||||||
clipboard_items_placeholder_2.apply {
|
clipboardItemsPlaceholder2.apply {
|
||||||
underlineText()
|
underlineText()
|
||||||
setTextColor(getProperPrimaryColor())
|
setTextColor(getProperPrimaryColor())
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
addOrEditClip()
|
addOrEditClip()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
setupToolbar(clipboard_toolbar, NavigationIcon.Arrow)
|
setupToolbar(binding.clipboardToolbar, NavigationIcon.Arrow)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
@ -67,7 +73,7 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
|
|||||||
|
|
||||||
|
|
||||||
private fun setupOptionsMenu() {
|
private fun setupOptionsMenu() {
|
||||||
clipboard_toolbar.setOnMenuItemClickListener { menuItem ->
|
binding.clipboardToolbar.setOnMenuItemClickListener { menuItem ->
|
||||||
when (menuItem.itemId) {
|
when (menuItem.itemId) {
|
||||||
R.id.add_clipboard_item -> {
|
R.id.add_clipboard_item -> {
|
||||||
addOrEditClip()
|
addOrEditClip()
|
||||||
@ -97,15 +103,17 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
|
|||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
val clips = clipsDB.getClips().toMutableList() as ArrayList<Clip>
|
val clips = clipsDB.getClips().toMutableList() as ArrayList<Clip>
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
ClipsActivityAdapter(this, clips, clipboard_items_list, this) {
|
ClipsActivityAdapter(this, clips, binding.clipboardItemsList, this) {
|
||||||
addOrEditClip(it as Clip)
|
addOrEditClip(it as Clip)
|
||||||
}.apply {
|
}.apply {
|
||||||
clipboard_items_list.adapter = this
|
binding.clipboardItemsList.adapter = this
|
||||||
}
|
}
|
||||||
|
|
||||||
clipboard_items_list.beVisibleIf(clips.isNotEmpty())
|
binding.apply {
|
||||||
clipboard_items_placeholder.beVisibleIf(clips.isEmpty())
|
clipboardItemsList.beVisibleIf(clips.isNotEmpty())
|
||||||
clipboard_items_placeholder_2.beVisibleIf(clips.isEmpty())
|
clipboardItemsPlaceholder.beVisibleIf(clips.isEmpty())
|
||||||
|
clipboardItemsPlaceholder2.beVisibleIf(clips.isEmpty())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,29 +7,31 @@ import com.simplemobiletools.commons.extensions.*
|
|||||||
import com.simplemobiletools.commons.helpers.NavigationIcon
|
import com.simplemobiletools.commons.helpers.NavigationIcon
|
||||||
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.databinding.ActivitySettingsBinding
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguageText
|
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguageText
|
||||||
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguages
|
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguages
|
||||||
import com.simplemobiletools.keyboard.helpers.*
|
import com.simplemobiletools.keyboard.helpers.*
|
||||||
import kotlinx.android.synthetic.main.activity_settings.*
|
import java.util.Locale
|
||||||
import java.util.*
|
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
class SettingsActivity : SimpleActivity() {
|
class SettingsActivity : SimpleActivity() {
|
||||||
|
private val binding by viewBinding(ActivitySettingsBinding::inflate)
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
isMaterialActivity = true
|
isMaterialActivity = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_settings)
|
setContentView(binding.root)
|
||||||
|
|
||||||
updateMaterialActivityViews(settings_coordinator, settings_holder, useTransparentNavigation = false, useTopSearchMenu = false)
|
binding.apply {
|
||||||
setupMaterialScrollListener(settings_nested_scrollview, settings_toolbar)
|
updateMaterialActivityViews(settingsCoordinator, settingsHolder, useTransparentNavigation = true, useTopSearchMenu = false)
|
||||||
|
setupMaterialScrollListener(settingsNestedScrollview, settingsToolbar)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
setupToolbar(settings_toolbar, NavigationIcon.Arrow)
|
setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow)
|
||||||
|
|
||||||
setupPurchaseThankYou()
|
setupPurchaseThankYou()
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
@ -45,47 +47,57 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupSentencesCapitalization()
|
setupSentencesCapitalization()
|
||||||
setupShowNumbersRow()
|
setupShowNumbersRow()
|
||||||
|
|
||||||
updateTextColors(settings_nested_scrollview)
|
binding.apply {
|
||||||
|
updateTextColors(settingsNestedScrollview)
|
||||||
|
|
||||||
arrayOf(settings_color_customization_section_label, settings_general_settings_label).forEach {
|
arrayOf(settingsColorCustomizationSectionLabel, settingsGeneralSettingsLabel).forEach {
|
||||||
it.setTextColor(getProperPrimaryColor())
|
it.setTextColor(getProperPrimaryColor())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupPurchaseThankYou() {
|
private fun setupPurchaseThankYou() {
|
||||||
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
binding.apply {
|
||||||
settings_purchase_thank_you_holder.setOnClickListener {
|
settingsPurchaseThankYouHolder.beGoneIf(isOrWasThankYouInstalled())
|
||||||
launchPurchaseThankYouIntent()
|
settingsPurchaseThankYouHolder.setOnClickListener {
|
||||||
|
launchPurchaseThankYouIntent()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupCustomizeColors() {
|
private fun setupCustomizeColors() {
|
||||||
settings_color_customization_label.text = getCustomizeColorsString()
|
binding.apply {
|
||||||
settings_color_customization_holder.setOnClickListener {
|
settingsColorCustomizationLabel.text = getCustomizeColorsString()
|
||||||
handleCustomizeColorsClick()
|
settingsColorCustomizationHolder.setOnClickListener {
|
||||||
|
handleCustomizeColorsClick()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupUseEnglish() {
|
private fun setupUseEnglish() {
|
||||||
settings_use_english_holder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") && !isTiramisuPlus())
|
binding.apply {
|
||||||
settings_use_english.isChecked = config.useEnglish
|
settingsUseEnglishHolder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") && !isTiramisuPlus())
|
||||||
settings_use_english_holder.setOnClickListener {
|
settingsUseEnglish.isChecked = config.useEnglish
|
||||||
settings_use_english.toggle()
|
settingsUseEnglishHolder.setOnClickListener {
|
||||||
config.useEnglish = settings_use_english.isChecked
|
settingsUseEnglish.toggle()
|
||||||
exitProcess(0)
|
config.useEnglish = settingsUseEnglish.isChecked
|
||||||
|
exitProcess(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupLanguage() {
|
private fun setupLanguage() {
|
||||||
settings_language.text = Locale.getDefault().displayLanguage
|
binding.apply {
|
||||||
settings_language_holder.beVisibleIf(isTiramisuPlus())
|
settingsLanguage.text = Locale.getDefault().displayLanguage
|
||||||
settings_language_holder.setOnClickListener {
|
settingsLanguageHolder.beVisibleIf(isTiramisuPlus())
|
||||||
launchChangeAppLanguageIntent()
|
settingsLanguageHolder.setOnClickListener {
|
||||||
|
launchChangeAppLanguageIntent()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupManageClipboardItems() {
|
private fun setupManageClipboardItems() {
|
||||||
settings_manage_clipboard_items_holder.setOnClickListener {
|
binding.settingsManageClipboardItemsHolder.setOnClickListener {
|
||||||
Intent(this, ManageClipboardItemsActivity::class.java).apply {
|
Intent(this, ManageClipboardItemsActivity::class.java).apply {
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
@ -93,56 +105,66 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupVibrateOnKeypress() {
|
private fun setupVibrateOnKeypress() {
|
||||||
settings_vibrate_on_keypress.isChecked = config.vibrateOnKeypress
|
binding.apply {
|
||||||
settings_vibrate_on_keypress_holder.setOnClickListener {
|
settingsVibrateOnKeypress.isChecked = config.vibrateOnKeypress
|
||||||
settings_vibrate_on_keypress.toggle()
|
settingsVibrateOnKeypressHolder.setOnClickListener {
|
||||||
config.vibrateOnKeypress = settings_vibrate_on_keypress.isChecked
|
settingsVibrateOnKeypress.toggle()
|
||||||
|
config.vibrateOnKeypress = settingsVibrateOnKeypress.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupShowPopupOnKeypress() {
|
private fun setupShowPopupOnKeypress() {
|
||||||
settings_show_popup_on_keypress.isChecked = config.showPopupOnKeypress
|
binding.apply {
|
||||||
settings_show_popup_on_keypress_holder.setOnClickListener {
|
settingsShowPopupOnKeypress.isChecked = config.showPopupOnKeypress
|
||||||
settings_show_popup_on_keypress.toggle()
|
settingsShowPopupOnKeypressHolder.setOnClickListener {
|
||||||
config.showPopupOnKeypress = settings_show_popup_on_keypress.isChecked
|
settingsShowPopupOnKeypress.toggle()
|
||||||
|
config.showPopupOnKeypress = settingsShowPopupOnKeypress.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupShowKeyBorders() {
|
private fun setupShowKeyBorders() {
|
||||||
settings_show_key_borders.isChecked = config.showKeyBorders
|
binding.apply {
|
||||||
settings_show_key_borders_holder.setOnClickListener {
|
settingsShowKeyBorders.isChecked = config.showKeyBorders
|
||||||
settings_show_key_borders.toggle()
|
settingsShowKeyBordersHolder.setOnClickListener {
|
||||||
config.showKeyBorders = settings_show_key_borders.isChecked
|
settingsShowKeyBorders.toggle()
|
||||||
|
config.showKeyBorders = settingsShowKeyBorders.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupKeyboardLanguage() {
|
private fun setupKeyboardLanguage() {
|
||||||
settings_keyboard_language.text = getKeyboardLanguageText(config.keyboardLanguage)
|
binding.apply {
|
||||||
settings_keyboard_language_holder.setOnClickListener {
|
settingsKeyboardLanguage.text = getKeyboardLanguageText(config.keyboardLanguage)
|
||||||
val items = getKeyboardLanguages()
|
settingsKeyboardLanguageHolder.setOnClickListener {
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.keyboardLanguage) {
|
val items = getKeyboardLanguages()
|
||||||
config.keyboardLanguage = it as Int
|
RadioGroupDialog(this@SettingsActivity, items, config.keyboardLanguage) {
|
||||||
settings_keyboard_language.text = getKeyboardLanguageText(config.keyboardLanguage)
|
config.keyboardLanguage = it as Int
|
||||||
|
settingsKeyboardLanguage.text = getKeyboardLanguageText(config.keyboardLanguage)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupKeyboardHeightMultiplier() {
|
private fun setupKeyboardHeightMultiplier() {
|
||||||
settings_keyboard_height_multiplier.text = getKeyboardHeightPercentageText(config.keyboardHeightPercentage)
|
binding.apply {
|
||||||
settings_keyboard_height_multiplier_holder.setOnClickListener {
|
settingsKeyboardHeightMultiplier.text = getKeyboardHeightPercentageText(config.keyboardHeightPercentage)
|
||||||
val items = arrayListOf(
|
settingsKeyboardHeightMultiplierHolder.setOnClickListener {
|
||||||
RadioItem(KEYBOARD_HEIGHT_70_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_70_PERCENT)),
|
val items = arrayListOf(
|
||||||
RadioItem(KEYBOARD_HEIGHT_80_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_80_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_70_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_70_PERCENT)),
|
||||||
RadioItem(KEYBOARD_HEIGHT_90_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_90_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_80_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_80_PERCENT)),
|
||||||
RadioItem(KEYBOARD_HEIGHT_100_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_100_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_90_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_90_PERCENT)),
|
||||||
RadioItem(KEYBOARD_HEIGHT_120_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_120_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_100_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_100_PERCENT)),
|
||||||
RadioItem(KEYBOARD_HEIGHT_140_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_140_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_120_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_120_PERCENT)),
|
||||||
RadioItem(KEYBOARD_HEIGHT_160_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_160_PERCENT)),
|
RadioItem(KEYBOARD_HEIGHT_140_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_140_PERCENT)),
|
||||||
)
|
RadioItem(KEYBOARD_HEIGHT_160_PERCENT, getKeyboardHeightPercentageText(KEYBOARD_HEIGHT_160_PERCENT)),
|
||||||
|
)
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.keyboardHeightPercentage) {
|
RadioGroupDialog(this@SettingsActivity, items, config.keyboardHeightPercentage) {
|
||||||
config.keyboardHeightPercentage = it as Int
|
config.keyboardHeightPercentage = it as Int
|
||||||
settings_keyboard_height_multiplier.text = getKeyboardHeightPercentageText(config.keyboardHeightPercentage)
|
settingsKeyboardHeightMultiplier.text = getKeyboardHeightPercentageText(config.keyboardHeightPercentage)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,26 +172,32 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
private fun getKeyboardHeightPercentageText(keyboardHeightPercentage: Int): String = "$keyboardHeightPercentage%"
|
private fun getKeyboardHeightPercentageText(keyboardHeightPercentage: Int): String = "$keyboardHeightPercentage%"
|
||||||
|
|
||||||
private fun setupShowClipboardContent() {
|
private fun setupShowClipboardContent() {
|
||||||
settings_show_clipboard_content.isChecked = config.showClipboardContent
|
binding.apply {
|
||||||
settings_show_clipboard_content_holder.setOnClickListener {
|
settingsShowClipboardContent.isChecked = config.showClipboardContent
|
||||||
settings_show_clipboard_content.toggle()
|
settingsShowClipboardContentHolder.setOnClickListener {
|
||||||
config.showClipboardContent = settings_show_clipboard_content.isChecked
|
settingsShowClipboardContent.toggle()
|
||||||
|
config.showClipboardContent = settingsShowClipboardContent.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupSentencesCapitalization() {
|
private fun setupSentencesCapitalization() {
|
||||||
settings_start_sentences_capitalized.isChecked = config.enableSentencesCapitalization
|
binding.apply {
|
||||||
settings_start_sentences_capitalized_holder.setOnClickListener {
|
settingsStartSentencesCapitalized.isChecked = config.enableSentencesCapitalization
|
||||||
settings_start_sentences_capitalized.toggle()
|
settingsStartSentencesCapitalizedHolder.setOnClickListener {
|
||||||
config.enableSentencesCapitalization = settings_start_sentences_capitalized.isChecked
|
settingsStartSentencesCapitalized.toggle()
|
||||||
|
config.enableSentencesCapitalization = settingsStartSentencesCapitalized.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupShowNumbersRow() {
|
private fun setupShowNumbersRow() {
|
||||||
settings_show_numbers_row.isChecked = config.showNumbersRow
|
binding.apply {
|
||||||
settings_show_numbers_row_holder.setOnClickListener {
|
settingsShowNumbersRow.isChecked = config.showNumbersRow
|
||||||
settings_show_numbers_row.toggle()
|
settingsShowNumbersRowHolder.setOnClickListener {
|
||||||
config.showNumbersRow = settings_show_numbers_row.isChecked
|
settingsShowNumbersRow.toggle()
|
||||||
|
config.showNumbersRow = settingsShowNumbersRow.isChecked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,12 @@ import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
|||||||
import com.simplemobiletools.commons.interfaces.StartReorderDragListener
|
import com.simplemobiletools.commons.interfaces.StartReorderDragListener
|
||||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
|
import com.simplemobiletools.keyboard.databinding.ItemClipInActivityBinding
|
||||||
import com.simplemobiletools.keyboard.dialogs.AddOrEditClipDialog
|
import com.simplemobiletools.keyboard.dialogs.AddOrEditClipDialog
|
||||||
import com.simplemobiletools.keyboard.extensions.clipsDB
|
import com.simplemobiletools.keyboard.extensions.clipsDB
|
||||||
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
import kotlinx.android.synthetic.main.item_clip_in_activity.view.*
|
import java.util.Collections
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class ClipsActivityAdapter(
|
class ClipsActivityAdapter(
|
||||||
activity: BaseSimpleActivity, var items: ArrayList<Clip>, recyclerView: MyRecyclerView, val listener: RefreshRecyclerViewListener, itemClick: (Any) -> Unit
|
activity: BaseSimpleActivity, var items: ArrayList<Clip>, recyclerView: MyRecyclerView, val listener: RefreshRecyclerViewListener, itemClick: (Any) -> Unit
|
||||||
@ -98,7 +98,7 @@ class ClipsActivityAdapter(
|
|||||||
wasClipMoved = false
|
wasClipMoved = false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_clip_in_activity, parent)
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(ItemClipInActivityBinding.inflate(layoutInflater, parent, false).root)
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
val item = items[position]
|
val item = items[position]
|
||||||
@ -154,15 +154,15 @@ class ClipsActivityAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val isSelected = selectedKeys.contains(clip.id!!.toInt())
|
val isSelected = selectedKeys.contains(clip.id!!.toInt())
|
||||||
view.apply {
|
ItemClipInActivityBinding.bind(view).apply {
|
||||||
setupViewBackground(activity)
|
root.setupViewBackground(activity)
|
||||||
clip_value.text = clip.value
|
clipValue.text = clip.value
|
||||||
clip_value.setTextColor(textColor)
|
clipValue.setTextColor(textColor)
|
||||||
clip_drag_handle.applyColorFilter(textColor)
|
clipDragHandle.applyColorFilter(textColor)
|
||||||
|
|
||||||
clip_drag_handle.beVisibleIf(selectedKeys.isNotEmpty())
|
clipDragHandle.beVisibleIf(selectedKeys.isNotEmpty())
|
||||||
clip_holder.isSelected = isSelected
|
clipHolder.isSelected = isSelected
|
||||||
clip_drag_handle.setOnTouchListener { v, event ->
|
clipDragHandle.setOnTouchListener { v, event ->
|
||||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||||
startReorderDragListener.requestDrag(holder)
|
startReorderDragListener.requestDrag(holder)
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
|
import com.simplemobiletools.keyboard.databinding.ItemClipOnKeyboardBinding
|
||||||
|
import com.simplemobiletools.keyboard.databinding.ItemSectionLabelBinding
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
import com.simplemobiletools.keyboard.extensions.getCurrentClip
|
import com.simplemobiletools.keyboard.extensions.getCurrentClip
|
||||||
import com.simplemobiletools.keyboard.extensions.getStrokeColor
|
import com.simplemobiletools.keyboard.extensions.getStrokeColor
|
||||||
@ -22,8 +24,6 @@ import com.simplemobiletools.keyboard.interfaces.RefreshClipsListener
|
|||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
import com.simplemobiletools.keyboard.models.ClipsSectionLabel
|
import com.simplemobiletools.keyboard.models.ClipsSectionLabel
|
||||||
import com.simplemobiletools.keyboard.models.ListItem
|
import com.simplemobiletools.keyboard.models.ListItem
|
||||||
import kotlinx.android.synthetic.main.item_clip_on_keyboard.view.*
|
|
||||||
import kotlinx.android.synthetic.main.item_section_label.view.*
|
|
||||||
|
|
||||||
class ClipsKeyboardAdapter(
|
class ClipsKeyboardAdapter(
|
||||||
val context: Context, var items: ArrayList<ListItem>, val refreshClipsListener: RefreshClipsListener,
|
val context: Context, var items: ArrayList<ListItem>, val refreshClipsListener: RefreshClipsListener,
|
||||||
@ -36,13 +36,12 @@ class ClipsKeyboardAdapter(
|
|||||||
private var backgroundColor = context.getProperBackgroundColor()
|
private var backgroundColor = context.getProperBackgroundColor()
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
val layoutId = when (viewType) {
|
val binding = when (viewType) {
|
||||||
ITEM_SECTION_LABEL -> R.layout.item_section_label
|
ITEM_SECTION_LABEL -> ItemSectionLabelBinding.inflate(layoutInflater, parent, false)
|
||||||
else -> R.layout.item_clip_on_keyboard
|
else -> ItemClipOnKeyboardBinding.inflate(layoutInflater, parent, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
val view = layoutInflater.inflate(layoutId, parent, false)
|
return ViewHolder(binding.root)
|
||||||
return ViewHolder(view)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
@ -65,13 +64,13 @@ class ClipsKeyboardAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupClip(view: View, clip: Clip) {
|
private fun setupClip(view: View, clip: Clip) {
|
||||||
view.apply {
|
ItemClipOnKeyboardBinding.bind(view).apply {
|
||||||
val rippleBg = clip_holder.background as RippleDrawable
|
val rippleBg = clipHolder.background as RippleDrawable
|
||||||
val layerDrawable = rippleBg.findDrawableByLayerId(R.id.clipboard_background_holder) as LayerDrawable
|
val layerDrawable = rippleBg.findDrawableByLayerId(R.id.clipboard_background_holder) as LayerDrawable
|
||||||
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_stroke).applyColorFilter(context.getStrokeColor())
|
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_stroke).applyColorFilter(context.getStrokeColor())
|
||||||
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(backgroundColor)
|
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(backgroundColor)
|
||||||
|
|
||||||
clip_value.apply {
|
clipValue.apply {
|
||||||
text = clip.value
|
text = clip.value
|
||||||
removeUnderlines()
|
removeUnderlines()
|
||||||
setTextColor(textColor)
|
setTextColor(textColor)
|
||||||
@ -81,13 +80,13 @@ class ClipsKeyboardAdapter(
|
|||||||
|
|
||||||
@SuppressLint("UseCompatLoadingForDrawables")
|
@SuppressLint("UseCompatLoadingForDrawables")
|
||||||
private fun setupSection(view: View, sectionLabel: ClipsSectionLabel) {
|
private fun setupSection(view: View, sectionLabel: ClipsSectionLabel) {
|
||||||
view.apply {
|
ItemSectionLabelBinding.bind(view).apply {
|
||||||
clips_section_label.apply {
|
clipsSectionLabel.apply {
|
||||||
text = sectionLabel.value
|
text = sectionLabel.value
|
||||||
setTextColor(textColor)
|
setTextColor(textColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
clips_section_icon.apply {
|
clipsSectionIcon.apply {
|
||||||
applyColorFilter(textColor)
|
applyColorFilter(textColor)
|
||||||
|
|
||||||
if (sectionLabel.isCurrent) {
|
if (sectionLabel.isCurrent) {
|
||||||
|
@ -6,15 +6,13 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.emoji2.text.EmojiCompat
|
import androidx.emoji2.text.EmojiCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.databinding.ItemEmojiBinding
|
||||||
import kotlinx.android.synthetic.main.item_emoji.view.*
|
|
||||||
|
|
||||||
class EmojisAdapter(val context: Context, var items: List<String>, val itemClick: (emoji: String) -> Unit) : RecyclerView.Adapter<EmojisAdapter.ViewHolder>() {
|
class EmojisAdapter(val context: Context, var items: List<String>, val itemClick: (emoji: String) -> Unit) : RecyclerView.Adapter<EmojisAdapter.ViewHolder>() {
|
||||||
private val layoutInflater = LayoutInflater.from(context)
|
private val layoutInflater = LayoutInflater.from(context)
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EmojisAdapter.ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EmojisAdapter.ViewHolder {
|
||||||
val layoutId = R.layout.item_emoji
|
val view = ItemEmojiBinding.inflate(layoutInflater, parent, false).root
|
||||||
val view = layoutInflater.inflate(layoutId, parent, false)
|
|
||||||
return ViewHolder(view)
|
return ViewHolder(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +27,7 @@ class EmojisAdapter(val context: Context, var items: List<String>, val itemClick
|
|||||||
|
|
||||||
private fun setupEmoji(view: View, emoji: String) {
|
private fun setupEmoji(view: View, emoji: String) {
|
||||||
val processed = EmojiCompat.get().process(emoji)
|
val processed = EmojiCompat.get().process(emoji)
|
||||||
view.emoji_value.text = processed
|
ItemEmojiBinding.bind(view).emojiValue.text = processed
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
@ -5,15 +5,15 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
|
import com.simplemobiletools.keyboard.databinding.DialogAddOrEditClipBinding
|
||||||
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
import kotlinx.android.synthetic.main.dialog_add_or_edit_clip.view.*
|
|
||||||
|
|
||||||
class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Clip?, val callback: () -> Unit) {
|
class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Clip?, val callback: () -> Unit) {
|
||||||
init {
|
init {
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dialog_add_or_edit_clip, null).apply {
|
val binding = DialogAddOrEditClipBinding.inflate(activity.layoutInflater).apply {
|
||||||
if (originalClip != null) {
|
if (originalClip != null) {
|
||||||
add_clip_value.setText(originalClip.value)
|
addClipValue.setText(originalClip.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,10 +21,10 @@ class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Cl
|
|||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.apply {
|
.apply {
|
||||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
activity.setupDialogStuff(binding.root, this) { alertDialog ->
|
||||||
alertDialog.showKeyboard(view.add_clip_value)
|
alertDialog.showKeyboard(binding.addClipValue)
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
val clipValue = view.add_clip_value.value
|
val clipValue = binding.addClipValue.value
|
||||||
if (clipValue.isEmpty()) {
|
if (clipValue.isEmpty()) {
|
||||||
activity.toast(R.string.value_cannot_be_empty)
|
activity.toast(R.string.value_cannot_be_empty)
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
|
@ -6,8 +6,8 @@ import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
|||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
|
import com.simplemobiletools.keyboard.databinding.DialogExportClipsBinding
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
import kotlinx.android.synthetic.main.dialog_export_clips.view.*
|
|
||||||
|
|
||||||
class ExportClipsDialog(
|
class ExportClipsDialog(
|
||||||
val activity: BaseSimpleActivity, path: String, val hidePath: Boolean, callback: (path: String, filename: String) -> Unit
|
val activity: BaseSimpleActivity, path: String, val hidePath: Boolean, callback: (path: String, filename: String) -> Unit
|
||||||
@ -19,17 +19,17 @@ class ExportClipsDialog(
|
|||||||
activity.internalStoragePath
|
activity.internalStoragePath
|
||||||
}
|
}
|
||||||
|
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dialog_export_clips, null).apply {
|
val binding = DialogExportClipsBinding.inflate(activity.layoutInflater).apply {
|
||||||
export_clips_filename.setText("${activity.getString(R.string.app_launcher_name)}_${activity.getCurrentFormattedDateTime()}")
|
exportClipsFilename.setText("${activity.getString(R.string.app_launcher_name)}_${activity.getCurrentFormattedDateTime()}")
|
||||||
|
|
||||||
if (hidePath) {
|
if (hidePath) {
|
||||||
export_clips_path_label.beGone()
|
exportClipsPathLabel.beGone()
|
||||||
export_clips_path.beGone()
|
exportClipsPath.beGone()
|
||||||
} else {
|
} else {
|
||||||
export_clips_path.text = activity.humanizePath(folder)
|
exportClipsPath.text = activity.humanizePath(folder)
|
||||||
export_clips_path.setOnClickListener {
|
exportClipsPath.setOnClickListener {
|
||||||
FilePickerDialog(activity, folder, false, showFAB = true) {
|
FilePickerDialog(activity, folder, false, showFAB = true) {
|
||||||
export_clips_path.text = activity.humanizePath(it)
|
exportClipsPath.text = activity.humanizePath(it)
|
||||||
folder = it
|
folder = it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,10 +40,10 @@ class ExportClipsDialog(
|
|||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.apply {
|
.apply {
|
||||||
activity.setupDialogStuff(view, this, R.string.export_clipboard_items) { alertDialog ->
|
activity.setupDialogStuff(binding.root, this, R.string.export_clipboard_items) { alertDialog ->
|
||||||
alertDialog.showKeyboard(view.export_clips_filename)
|
alertDialog.showKeyboard(binding.exportClipsFilename)
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
val filename = view.export_clips_filename.value
|
val filename = binding.exportClipsFilename.value
|
||||||
if (filename.isEmpty()) {
|
if (filename.isEmpty()) {
|
||||||
activity.toast(R.string.filename_cannot_be_empty)
|
activity.toast(R.string.filename_cannot_be_empty)
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
|
@ -4,10 +4,10 @@ import android.view.ContextThemeWrapper
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.RadioButton
|
|
||||||
import android.widget.RadioGroup
|
import android.widget.RadioGroup
|
||||||
import android.widget.ScrollView
|
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
import com.simplemobiletools.commons.databinding.DialogRadioGroupBinding
|
||||||
|
import com.simplemobiletools.commons.databinding.RadioButtonBinding
|
||||||
import com.simplemobiletools.commons.extensions.onGlobalLayout
|
import com.simplemobiletools.commons.extensions.onGlobalLayout
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
@ -31,10 +31,10 @@ class KeyboardRadioGroupDialog(
|
|||||||
private val layoutInflater = LayoutInflater.from(context)
|
private val layoutInflater = LayoutInflater.from(context)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val view = layoutInflater.inflate(R.layout.dialog_radio_group, null)
|
val binding = DialogRadioGroupBinding.inflate(layoutInflater)
|
||||||
val radioGroup = view.findViewById<RadioGroup>(R.id.dialog_radio_group).apply {
|
binding.dialogRadioGroup.apply {
|
||||||
for (i in 0 until items.size) {
|
for (i in 0 until items.size) {
|
||||||
val radioButton = (layoutInflater.inflate(R.layout.radio_button, null) as RadioButton).apply {
|
val radioButton = RadioButtonBinding.inflate(layoutInflater).dialogRadioButton.apply {
|
||||||
text = items[i].title
|
text = items[i].title
|
||||||
isChecked = items[i].id == checkedItemId
|
isChecked = items[i].id == checkedItemId
|
||||||
id = i
|
id = i
|
||||||
@ -57,15 +57,15 @@ class KeyboardRadioGroupDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
builder.apply {
|
builder.apply {
|
||||||
context.setupKeyboardDialogStuff(inputView.windowToken, view, this, titleId) { alertDialog ->
|
context.setupKeyboardDialogStuff(inputView.windowToken, binding.root, this, titleId) { alertDialog ->
|
||||||
dialog = alertDialog
|
dialog = alertDialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedItemId != -1) {
|
if (selectedItemId != -1) {
|
||||||
view.findViewById<ScrollView>(R.id.dialog_radio_holder).apply {
|
binding.dialogRadioHolder.apply {
|
||||||
onGlobalLayout {
|
onGlobalLayout {
|
||||||
scrollY = radioGroup.findViewById<View>(selectedItemId).bottom - height
|
scrollY = binding.dialogRadioGroup.findViewById<View>(selectedItemId).bottom - height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import android.widget.TextView
|
|||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.simplemobiletools.commons.databinding.DialogTitleBinding
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
@ -120,8 +121,7 @@ fun Context.setupKeyboardDialogStuff(
|
|||||||
} else {
|
} else {
|
||||||
var title: TextView? = null
|
var title: TextView? = null
|
||||||
if (titleId != 0 || titleText.isNotEmpty()) {
|
if (titleId != 0 || titleText.isNotEmpty()) {
|
||||||
title = LayoutInflater.from(this).inflate(R.layout.dialog_title, null) as TextView
|
title = DialogTitleBinding.inflate(LayoutInflater.from(this)).dialogTitleTextview.apply {
|
||||||
title.apply {
|
|
||||||
if (titleText.isNotEmpty()) {
|
if (titleText.isNotEmpty()) {
|
||||||
text = titleText
|
text = titleText
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,14 +31,13 @@ import androidx.core.graphics.drawable.toBitmap
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
|
import com.simplemobiletools.keyboard.databinding.KeyboardViewKeyboardBinding
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
import com.simplemobiletools.keyboard.extensions.getStrokeColor
|
import com.simplemobiletools.keyboard.extensions.getStrokeColor
|
||||||
import com.simplemobiletools.keyboard.extensions.safeStorageContext
|
import com.simplemobiletools.keyboard.extensions.safeStorageContext
|
||||||
import com.simplemobiletools.keyboard.helpers.*
|
import com.simplemobiletools.keyboard.helpers.*
|
||||||
import com.simplemobiletools.keyboard.interfaces.OnKeyboardActionListener
|
import com.simplemobiletools.keyboard.interfaces.OnKeyboardActionListener
|
||||||
import com.simplemobiletools.keyboard.views.MyKeyboardView
|
import com.simplemobiletools.keyboard.views.MyKeyboardView
|
||||||
import kotlinx.android.synthetic.main.keyboard_view_keyboard.view.keyboard_holder
|
|
||||||
import kotlinx.android.synthetic.main.keyboard_view_keyboard.view.keyboard_view
|
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
// based on https://www.androidauthority.com/lets-build-custom-keyboard-android-832362/
|
// based on https://www.androidauthority.com/lets-build-custom-keyboard-android-832362/
|
||||||
@ -60,19 +59,22 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
|||||||
private var switchToLetters = false
|
private var switchToLetters = false
|
||||||
private var breakIterator: BreakIterator? = null
|
private var breakIterator: BreakIterator? = null
|
||||||
|
|
||||||
|
private lateinit var binding: KeyboardViewKeyboardBinding
|
||||||
|
|
||||||
override fun onInitializeInterface() {
|
override fun onInitializeInterface() {
|
||||||
super.onInitializeInterface()
|
super.onInitializeInterface()
|
||||||
safeStorageContext.getSharedPrefs().registerOnSharedPreferenceChangeListener(this)
|
safeStorageContext.getSharedPrefs().registerOnSharedPreferenceChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateInputView(): View {
|
override fun onCreateInputView(): View {
|
||||||
val keyboardHolder = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null)
|
binding = KeyboardViewKeyboardBinding.inflate(layoutInflater)
|
||||||
keyboardView = keyboardHolder.keyboard_view as MyKeyboardView
|
keyboardView = binding.keyboardView.apply {
|
||||||
keyboardView!!.setKeyboardHolder(keyboardHolder.keyboard_holder)
|
setKeyboardHolder(binding)
|
||||||
keyboardView!!.setKeyboard(keyboard!!)
|
setKeyboard(keyboard!!)
|
||||||
keyboardView!!.setEditorInfo(currentInputEditorInfo)
|
setEditorInfo(currentInputEditorInfo)
|
||||||
keyboardView!!.mOnKeyboardActionListener = this
|
mOnKeyboardActionListener = this@SimpleKeyboardIME
|
||||||
return keyboardHolder!!
|
}
|
||||||
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPress(primaryCode: Int) {
|
override fun onPress(primaryCode: Int) {
|
||||||
|
@ -37,6 +37,9 @@ import com.simplemobiletools.keyboard.activities.ManageClipboardItemsActivity
|
|||||||
import com.simplemobiletools.keyboard.activities.SettingsActivity
|
import com.simplemobiletools.keyboard.activities.SettingsActivity
|
||||||
import com.simplemobiletools.keyboard.adapters.ClipsKeyboardAdapter
|
import com.simplemobiletools.keyboard.adapters.ClipsKeyboardAdapter
|
||||||
import com.simplemobiletools.keyboard.adapters.EmojisAdapter
|
import com.simplemobiletools.keyboard.adapters.EmojisAdapter
|
||||||
|
import com.simplemobiletools.keyboard.databinding.KeyboardKeyPreviewBinding
|
||||||
|
import com.simplemobiletools.keyboard.databinding.KeyboardPopupKeyboardBinding
|
||||||
|
import com.simplemobiletools.keyboard.databinding.KeyboardViewKeyboardBinding
|
||||||
import com.simplemobiletools.keyboard.dialogs.ChangeLanguagePopup
|
import com.simplemobiletools.keyboard.dialogs.ChangeLanguagePopup
|
||||||
import com.simplemobiletools.keyboard.extensions.*
|
import com.simplemobiletools.keyboard.extensions.*
|
||||||
import com.simplemobiletools.keyboard.helpers.*
|
import com.simplemobiletools.keyboard.helpers.*
|
||||||
@ -51,8 +54,6 @@ import com.simplemobiletools.keyboard.interfaces.RefreshClipsListener
|
|||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
import com.simplemobiletools.keyboard.models.ClipsSectionLabel
|
import com.simplemobiletools.keyboard.models.ClipsSectionLabel
|
||||||
import com.simplemobiletools.keyboard.models.ListItem
|
import com.simplemobiletools.keyboard.models.ListItem
|
||||||
import kotlinx.android.synthetic.main.keyboard_popup_keyboard.view.*
|
|
||||||
import kotlinx.android.synthetic.main.keyboard_view_keyboard.view.*
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@SuppressLint("UseCompatLoadingForDrawables", "ClickableViewAccessibility")
|
@SuppressLint("UseCompatLoadingForDrawables", "ClickableViewAccessibility")
|
||||||
@ -66,6 +67,9 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var keyboardPopupBinding: KeyboardPopupKeyboardBinding? = null
|
||||||
|
private var keyboardViewBinding: KeyboardViewKeyboardBinding? = null
|
||||||
|
|
||||||
private var accessHelper: AccessHelper? = null
|
private var accessHelper: AccessHelper? = null
|
||||||
|
|
||||||
private var mKeyboard: MyKeyboard? = null
|
private var mKeyboard: MyKeyboard? = null
|
||||||
@ -203,7 +207,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
mPreviewPopup = PopupWindow(context)
|
mPreviewPopup = PopupWindow(context)
|
||||||
mPreviewText = inflater.inflate(resources.getLayout(R.layout.keyboard_key_preview), null) as TextView
|
mPreviewText = KeyboardKeyPreviewBinding.inflate(inflater).root
|
||||||
mPreviewTextSizeLarge = context.resources.getDimension(R.dimen.preview_text_size).toInt()
|
mPreviewTextSizeLarge = context.resources.getDimension(R.dimen.preview_text_size).toInt()
|
||||||
mPreviewPopup.contentView = mPreviewText
|
mPreviewPopup.contentView = mPreviewText
|
||||||
mPreviewPopup.setBackgroundDrawable(null)
|
mPreviewPopup.setBackgroundDrawable(null)
|
||||||
@ -285,14 +289,14 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the top row above the keyboard containing a couple buttons and the clipboard **/
|
/** Sets the top row above the keyboard containing a couple buttons and the clipboard **/
|
||||||
fun setKeyboardHolder(keyboardHolder: View) {
|
fun setKeyboardHolder(binding: KeyboardViewKeyboardBinding) {
|
||||||
mToolbarHolder = keyboardHolder.toolbar_holder
|
keyboardViewBinding = binding.apply {
|
||||||
mClipboardManagerHolder = keyboardHolder.clipboard_manager_holder
|
mToolbarHolder = toolbarHolder
|
||||||
mEmojiPaletteHolder = keyboardHolder.emoji_palette_holder
|
mClipboardManagerHolder = clipboardManagerHolder
|
||||||
|
mEmojiPaletteHolder = emojiPaletteHolder
|
||||||
|
|
||||||
mToolbarHolder!!.apply {
|
settingsCog.setOnLongClickListener { context.toast(R.string.settings); true; }
|
||||||
settings_cog.setOnLongClickListener { context.toast(R.string.settings); true; }
|
settingsCog.setOnClickListener {
|
||||||
settings_cog.setOnClickListener {
|
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
Intent(context, SettingsActivity::class.java).apply {
|
Intent(context, SettingsActivity::class.java).apply {
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
@ -300,23 +304,23 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pinned_clipboard_items.setOnLongClickListener { context.toast(R.string.clipboard); true; }
|
pinnedClipboardItems.setOnLongClickListener { context.toast(R.string.clipboard); true; }
|
||||||
pinned_clipboard_items.setOnClickListener {
|
pinnedClipboardItems.setOnClickListener {
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
openClipboardManager()
|
openClipboardManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
clipboard_clear.setOnLongClickListener { context.toast(R.string.clear_clipboard_data); true; }
|
clipboardClear.setOnLongClickListener { context.toast(R.string.clear_clipboard_data); true; }
|
||||||
clipboard_clear.setOnClickListener {
|
clipboardClear.setOnClickListener {
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
clearClipboardContent()
|
clearClipboardContent()
|
||||||
toggleClipboardVisibility(false)
|
toggleClipboardVisibility(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
suggestions_holder.addOnLayoutChangeListener(object : OnLayoutChangeListener {
|
suggestionsHolder.addOnLayoutChangeListener(object : OnLayoutChangeListener {
|
||||||
override fun onLayoutChange(v: View?, left: Int, top: Int, right: Int, bottom: Int, oldLeft: Int, oldTop: Int, oldRight: Int, oldBottom: Int) {
|
override fun onLayoutChange(v: View?, left: Int, top: Int, right: Int, bottom: Int, oldLeft: Int, oldTop: Int, oldRight: Int, oldBottom: Int) {
|
||||||
updateSuggestionsToolbarLayout()
|
updateSuggestionsToolbarLayout()
|
||||||
suggestions_holder.removeOnLayoutChangeListener(this)
|
binding.suggestionsHolder.removeOnLayoutChangeListener(this)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -330,23 +334,21 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
setupStoredClips()
|
setupStoredClips()
|
||||||
}
|
}
|
||||||
|
|
||||||
mClipboardManagerHolder!!.apply {
|
binding.apply {
|
||||||
clipboard_manager_close.setOnClickListener {
|
clipboardManagerClose.setOnClickListener {
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
closeClipboardManager()
|
closeClipboardManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
clipboard_manager_manage.setOnLongClickListener { context.toast(R.string.manage_clipboard_items); true; }
|
clipboardManagerManage.setOnLongClickListener { context.toast(R.string.manage_clipboard_items); true; }
|
||||||
clipboard_manager_manage.setOnClickListener {
|
clipboardManagerManage.setOnClickListener {
|
||||||
Intent(context, ManageClipboardItemsActivity::class.java).apply {
|
Intent(context, ManageClipboardItemsActivity::class.java).apply {
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
context.startActivity(this)
|
context.startActivity(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mEmojiPaletteHolder!!.apply {
|
emojiPaletteClose.setOnClickListener {
|
||||||
emoji_palette_close.setOnClickListener {
|
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
closeEmojiPalette()
|
closeEmojiPalette()
|
||||||
}
|
}
|
||||||
@ -367,7 +369,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
mUsingSystemTheme = config.isUsingSystemTheme
|
mUsingSystemTheme = config.isUsingSystemTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
val isMainKeyboard = changedView == null || changedView != mini_keyboard_view
|
val isMainKeyboard = changedView == null || changedView != keyboardPopupBinding?.miniKeyboardView
|
||||||
mKeyBackground = if (mShowKeyBorders && isMainKeyboard) {
|
mKeyBackground = if (mShowKeyBorders && isMainKeyboard) {
|
||||||
resources.getDrawable(R.drawable.keyboard_key_selector_outlined, context.theme)
|
resources.getDrawable(R.drawable.keyboard_key_selector_outlined, context.theme)
|
||||||
} else {
|
} else {
|
||||||
@ -397,35 +399,33 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(mBackgroundColor)
|
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(mBackgroundColor)
|
||||||
|
|
||||||
val wasDarkened = mBackgroundColor != mBackgroundColor.darkenColor()
|
val wasDarkened = mBackgroundColor != mBackgroundColor.darkenColor()
|
||||||
mToolbarHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
top_keyboard_divider.beGoneIf(wasDarkened)
|
topKeyboardDivider.beGoneIf(wasDarkened)
|
||||||
top_keyboard_divider.background = ColorDrawable(strokeColor)
|
topKeyboardDivider.background = ColorDrawable(strokeColor)
|
||||||
|
mToolbarHolder?.background = ColorDrawable(toolbarColor)
|
||||||
|
|
||||||
background = ColorDrawable(toolbarColor)
|
clipboardValue.apply {
|
||||||
clipboard_value.apply {
|
|
||||||
background = rippleBg
|
background = rippleBg
|
||||||
setTextColor(mTextColor)
|
setTextColor(mTextColor)
|
||||||
setLinkTextColor(mTextColor)
|
setLinkTextColor(mTextColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
settings_cog.applyColorFilter(mTextColor)
|
settingsCog.applyColorFilter(mTextColor)
|
||||||
pinned_clipboard_items.applyColorFilter(mTextColor)
|
pinnedClipboardItems.applyColorFilter(mTextColor)
|
||||||
clipboard_clear.applyColorFilter(mTextColor)
|
clipboardClear.applyColorFilter(mTextColor)
|
||||||
|
|
||||||
beInvisibleIf(context.isDeviceLocked)
|
mToolbarHolder?.beInvisibleIf(context.isDeviceLocked)
|
||||||
}
|
|
||||||
|
|
||||||
mClipboardManagerHolder?.apply {
|
topClipboardDivider.beGoneIf(wasDarkened)
|
||||||
top_clipboard_divider.beGoneIf(wasDarkened)
|
topClipboardDivider.background = ColorDrawable(strokeColor)
|
||||||
top_clipboard_divider.background = ColorDrawable(strokeColor)
|
clipboardManagerHolder.background = ColorDrawable(toolbarColor)
|
||||||
clipboard_manager_holder.background = ColorDrawable(toolbarColor)
|
|
||||||
|
|
||||||
clipboard_manager_close.applyColorFilter(mTextColor)
|
clipboardManagerClose.applyColorFilter(mTextColor)
|
||||||
clipboard_manager_manage.applyColorFilter(mTextColor)
|
clipboardManagerManage.applyColorFilter(mTextColor)
|
||||||
|
|
||||||
clipboard_manager_label.setTextColor(mTextColor)
|
clipboardManagerLabel.setTextColor(mTextColor)
|
||||||
clipboard_content_placeholder_1.setTextColor(mTextColor)
|
clipboardContentPlaceholder1.setTextColor(mTextColor)
|
||||||
clipboard_content_placeholder_2.setTextColor(mTextColor)
|
clipboardContentPlaceholder2.setTextColor(mTextColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
setupEmojiPalette(toolbarColor = toolbarColor, backgroundColor = mBackgroundColor, textColor = mTextColor)
|
setupEmojiPalette(toolbarColor = toolbarColor, backgroundColor = mBackgroundColor, textColor = mTextColor)
|
||||||
@ -739,8 +739,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
if (mToolbarHolder != null && mPopupParent.id != R.id.mini_keyboard_view && context.config.showClipboardContent) {
|
if (mToolbarHolder != null && mPopupParent.id != R.id.mini_keyboard_view && context.config.showClipboardContent) {
|
||||||
val clipboardContent = context.getCurrentClip()
|
val clipboardContent = context.getCurrentClip()
|
||||||
if (clipboardContent?.isNotEmpty() == true) {
|
if (clipboardContent?.isNotEmpty() == true) {
|
||||||
mToolbarHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
clipboard_value.apply {
|
clipboardValue.apply {
|
||||||
text = clipboardContent
|
text = clipboardContent
|
||||||
removeUnderlines()
|
removeUnderlines()
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
@ -760,11 +760,11 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun hideClipboardViews() {
|
private fun hideClipboardViews() {
|
||||||
mToolbarHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
clipboard_value?.beGone()
|
clipboardValue.beGone()
|
||||||
clipboard_value?.alpha = 0f
|
clipboardValue.alpha = 0f
|
||||||
clipboard_clear?.beGone()
|
clipboardClear.beGone()
|
||||||
clipboard_clear?.alpha = 0f
|
clipboardClear.alpha = 0f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,13 +779,13 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleClipboardVisibility(show: Boolean) {
|
private fun toggleClipboardVisibility(show: Boolean) {
|
||||||
if ((show && mToolbarHolder?.clipboard_value!!.alpha == 0f) || (!show && mToolbarHolder?.clipboard_value!!.alpha == 1f)) {
|
if ((show && keyboardViewBinding?.clipboardValue!!.alpha == 0f) || (!show && keyboardViewBinding?.clipboardValue!!.alpha == 1f)) {
|
||||||
val newAlpha = if (show) 1f else 0f
|
val newAlpha = if (show) 1f else 0f
|
||||||
val animations = ArrayList<ObjectAnimator>()
|
val animations = ArrayList<ObjectAnimator>()
|
||||||
val clipboardValueAnimation = ObjectAnimator.ofFloat(mToolbarHolder!!.clipboard_value!!, "alpha", newAlpha)
|
val clipboardValueAnimation = ObjectAnimator.ofFloat(keyboardViewBinding!!.clipboardValue, "alpha", newAlpha)
|
||||||
animations.add(clipboardValueAnimation)
|
animations.add(clipboardValueAnimation)
|
||||||
|
|
||||||
val clipboardClearAnimation = ObjectAnimator.ofFloat(mToolbarHolder!!.clipboard_clear!!, "alpha", newAlpha)
|
val clipboardClearAnimation = ObjectAnimator.ofFloat(keyboardViewBinding!!.clipboardClear, "alpha", newAlpha)
|
||||||
animations.add(clipboardClearAnimation)
|
animations.add(clipboardClearAnimation)
|
||||||
|
|
||||||
val animSet = AnimatorSet()
|
val animSet = AnimatorSet()
|
||||||
@ -794,14 +794,14 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
animSet.interpolator = AccelerateInterpolator()
|
animSet.interpolator = AccelerateInterpolator()
|
||||||
animSet.doOnStart {
|
animSet.doOnStart {
|
||||||
if (show) {
|
if (show) {
|
||||||
mToolbarHolder?.clipboard_value?.beVisible()
|
keyboardViewBinding?.clipboardValue?.beVisible()
|
||||||
mToolbarHolder?.clipboard_clear?.beVisible()
|
keyboardViewBinding?.clipboardClear?.beVisible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
animSet.doOnEnd {
|
animSet.doOnEnd {
|
||||||
if (!show) {
|
if (!show) {
|
||||||
mToolbarHolder?.clipboard_value?.beGone()
|
keyboardViewBinding?.clipboardValue?.beGone()
|
||||||
mToolbarHolder?.clipboard_clear?.beGone()
|
keyboardViewBinding?.clipboardClear?.beGone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
animSet.start()
|
animSet.start()
|
||||||
@ -1001,8 +1001,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
mMiniKeyboardContainer = mMiniKeyboardCache[popupKey]
|
mMiniKeyboardContainer = mMiniKeyboardCache[popupKey]
|
||||||
if (mMiniKeyboardContainer == null) {
|
if (mMiniKeyboardContainer == null) {
|
||||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||||
mMiniKeyboardContainer = inflater.inflate(mPopupLayout, null)
|
keyboardPopupBinding = KeyboardPopupKeyboardBinding.inflate(inflater).apply {
|
||||||
mMiniKeyboard = mMiniKeyboardContainer!!.findViewById<View>(R.id.mini_keyboard_view) as MyKeyboardView
|
mMiniKeyboardContainer = root
|
||||||
|
mMiniKeyboard = miniKeyboardView
|
||||||
|
}
|
||||||
|
|
||||||
mMiniKeyboard!!.mOnKeyboardActionListener = object : OnKeyboardActionListener {
|
mMiniKeyboard!!.mOnKeyboardActionListener = object : OnKeyboardActionListener {
|
||||||
override fun onKey(code: Int) {
|
override fun onKey(code: Int) {
|
||||||
@ -1048,7 +1050,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
)
|
)
|
||||||
mMiniKeyboardCache[popupKey] = mMiniKeyboardContainer
|
mMiniKeyboardCache[popupKey] = mMiniKeyboardContainer
|
||||||
} else {
|
} else {
|
||||||
mMiniKeyboard = mMiniKeyboardContainer!!.findViewById<View>(R.id.mini_keyboard_view) as MyKeyboardView
|
mMiniKeyboard = keyboardPopupBinding!!.miniKeyboardView
|
||||||
}
|
}
|
||||||
|
|
||||||
getLocationInWindow(mCoordinates)
|
getLocationInWindow(mCoordinates)
|
||||||
@ -1395,13 +1397,17 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun closeClipboardManager() {
|
fun closeClipboardManager() {
|
||||||
mClipboardManagerHolder?.clipboard_manager_holder?.beGone()
|
keyboardViewBinding?.apply {
|
||||||
mToolbarHolder?.suggestions_holder?.showAllInlineContentViews()
|
clipboardManagerHolder.beGone()
|
||||||
|
suggestionsHolder.showAllInlineContentViews()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openClipboardManager() {
|
private fun openClipboardManager() {
|
||||||
mClipboardManagerHolder!!.clipboard_manager_holder.beVisible()
|
keyboardViewBinding?.apply {
|
||||||
mToolbarHolder?.suggestions_holder?.hideAllInlineContentViews()
|
clipboardManagerHolder.beVisible()
|
||||||
|
suggestionsHolder.hideAllInlineContentViews()
|
||||||
|
}
|
||||||
setupStoredClips()
|
setupStoredClips()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1434,10 +1440,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupClipsAdapter(clips: ArrayList<ListItem>) {
|
private fun setupClipsAdapter(clips: ArrayList<ListItem>) {
|
||||||
mClipboardManagerHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
clipboard_content_placeholder_1.beVisibleIf(clips.isEmpty())
|
clipboardContentPlaceholder1.beVisibleIf(clips.isEmpty())
|
||||||
clipboard_content_placeholder_2.beVisibleIf(clips.isEmpty())
|
clipboardContentPlaceholder2.beVisibleIf(clips.isEmpty())
|
||||||
clips_list.beVisibleIf(clips.isNotEmpty())
|
clipsList.beVisibleIf(clips.isNotEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
val refreshClipsListener = object : RefreshClipsListener {
|
val refreshClipsListener = object : RefreshClipsListener {
|
||||||
@ -1451,26 +1457,27 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
mClipboardManagerHolder?.clips_list?.adapter = adapter
|
keyboardViewBinding?.clipsList?.adapter = adapter
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupEmojiPalette(toolbarColor: Int, backgroundColor: Int, textColor: Int) {
|
private fun setupEmojiPalette(toolbarColor: Int, backgroundColor: Int, textColor: Int) {
|
||||||
mEmojiPaletteHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
emoji_palette_top_bar.background = ColorDrawable(toolbarColor)
|
emojiPaletteTopBar.background = ColorDrawable(toolbarColor)
|
||||||
emoji_palette_holder.background = ColorDrawable(backgroundColor)
|
emojiPaletteHolder.background = ColorDrawable(backgroundColor)
|
||||||
emoji_palette_close.applyColorFilter(textColor)
|
emojiPaletteClose.applyColorFilter(textColor)
|
||||||
emoji_palette_label.setTextColor(textColor)
|
emojiPaletteLabel.setTextColor(textColor)
|
||||||
|
|
||||||
emoji_palette_bottom_bar.background = ColorDrawable(backgroundColor)
|
emojiPaletteBottomBar.background = ColorDrawable(backgroundColor)
|
||||||
val bottomTextColor = textColor.darkenColor()
|
val bottomTextColor = textColor.darkenColor()
|
||||||
emoji_palette_mode_change.apply {
|
emojiPaletteModeChange.apply {
|
||||||
setTextColor(bottomTextColor)
|
setTextColor(bottomTextColor)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
closeEmojiPalette()
|
closeEmojiPalette()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emoji_palette_backspace.apply {
|
|
||||||
|
emojiPaletteBackspace.apply {
|
||||||
applyColorFilter(bottomTextColor)
|
applyColorFilter(bottomTextColor)
|
||||||
setOnTouchListener { _, event ->
|
setOnTouchListener { _, event ->
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
@ -1498,18 +1505,19 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setupEmojis()
|
setupEmojis()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openEmojiPalette() {
|
fun openEmojiPalette() {
|
||||||
mEmojiPaletteHolder!!.emoji_palette_holder.beVisible()
|
keyboardViewBinding!!.emojiPaletteHolder.beVisible()
|
||||||
setupEmojis()
|
setupEmojis()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun closeEmojiPalette() {
|
private fun closeEmojiPalette() {
|
||||||
mEmojiPaletteHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
emoji_palette_holder?.beGone()
|
emojiPaletteHolder.beGone()
|
||||||
mEmojiPaletteHolder?.emojis_list?.scrollToPosition(0)
|
emojisList?.scrollToPosition(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1539,7 +1547,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupEmojiAdapter(emojis: List<String>) {
|
private fun setupEmojiAdapter(emojis: List<String>) {
|
||||||
mEmojiPaletteHolder?.emojis_list?.apply {
|
keyboardViewBinding?.emojisList?.apply {
|
||||||
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)
|
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)
|
||||||
val emojiTopBarElevation = context.resources.getDimensionPixelSize(R.dimen.emoji_top_bar_elevation).toFloat()
|
val emojiTopBarElevation = context.resources.getDimensionPixelSize(R.dimen.emoji_top_bar_elevation).toFloat()
|
||||||
|
|
||||||
@ -1550,7 +1558,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
onScroll {
|
onScroll {
|
||||||
mEmojiPaletteHolder!!.emoji_palette_top_bar.elevation = if (it > 4) emojiTopBarElevation else 0f
|
keyboardViewBinding!!.emojiPaletteTopBar.elevation = if (it > 4) emojiTopBarElevation else 0f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1634,14 +1642,14 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.R)
|
@RequiresApi(Build.VERSION_CODES.R)
|
||||||
fun addToClipboardViews(it: InlineContentView, addToFront: Boolean = false) {
|
fun addToClipboardViews(it: InlineContentView, addToFront: Boolean = false) {
|
||||||
if (mToolbarHolder?.autofill_suggestions_holder != null) {
|
if (keyboardViewBinding?.autofillSuggestionsHolder != null) {
|
||||||
val newLayoutParams = LinearLayout.LayoutParams(it.layoutParams)
|
val newLayoutParams = LinearLayout.LayoutParams(it.layoutParams)
|
||||||
newLayoutParams.updateMarginsRelative(start = resources.getDimensionPixelSize(R.dimen.normal_margin))
|
newLayoutParams.updateMarginsRelative(start = resources.getDimensionPixelSize(R.dimen.normal_margin))
|
||||||
it.layoutParams = newLayoutParams
|
it.layoutParams = newLayoutParams
|
||||||
if (addToFront) {
|
if (addToFront) {
|
||||||
mToolbarHolder?.autofill_suggestions_holder?.addView(it, 0)
|
keyboardViewBinding?.autofillSuggestionsHolder?.addView(it, 0)
|
||||||
} else {
|
} else {
|
||||||
mToolbarHolder?.autofill_suggestions_holder?.addView(it)
|
keyboardViewBinding?.autofillSuggestionsHolder?.addView(it)
|
||||||
}
|
}
|
||||||
updateSuggestionsToolbarLayout()
|
updateSuggestionsToolbarLayout()
|
||||||
}
|
}
|
||||||
@ -1649,21 +1657,21 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.R)
|
@RequiresApi(Build.VERSION_CODES.R)
|
||||||
fun clearClipboardViews() {
|
fun clearClipboardViews() {
|
||||||
mToolbarHolder?.autofill_suggestions_holder?.removeAllViews()
|
keyboardViewBinding?.autofillSuggestionsHolder?.removeAllViews()
|
||||||
updateSuggestionsToolbarLayout()
|
updateSuggestionsToolbarLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateSuggestionsToolbarLayout() {
|
private fun updateSuggestionsToolbarLayout() {
|
||||||
mToolbarHolder?.apply {
|
keyboardViewBinding?.apply {
|
||||||
if (hasInlineViews()) {
|
if (hasInlineViews()) {
|
||||||
// make room on suggestion toolbar for inline views
|
// make room on suggestion toolbar for inline views
|
||||||
suggestions_items_holder?.gravity = Gravity.NO_GRAVITY
|
suggestionsItemsHolder.gravity = Gravity.NO_GRAVITY
|
||||||
clipboard_value?.maxWidth = resources.getDimensionPixelSize(R.dimen.suggestion_max_width)
|
clipboardValue.maxWidth = resources.getDimensionPixelSize(R.dimen.suggestion_max_width)
|
||||||
} else {
|
} else {
|
||||||
// restore original clipboard toolbar appearance
|
// restore original clipboard toolbar appearance
|
||||||
suggestions_items_holder?.gravity = Gravity.CENTER_HORIZONTAL
|
suggestionsItemsHolder.gravity = Gravity.CENTER_HORIZONTAL
|
||||||
suggestions_holder?.measuredWidth?.also { maxWidth ->
|
suggestionsHolder.measuredWidth.also { maxWidth ->
|
||||||
clipboard_value?.maxWidth = maxWidth
|
clipboardValue.maxWidth = maxWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1672,5 +1680,5 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
/**
|
/**
|
||||||
* Returns true if there are [InlineContentView]s in [autofill_suggestions_holder]
|
* Returns true if there are [InlineContentView]s in [autofill_suggestions_holder]
|
||||||
*/
|
*/
|
||||||
private fun hasInlineViews() = (mToolbarHolder?.autofill_suggestions_holder?.childCount ?: 0) > 0
|
private fun hasInlineViews() = (keyboardViewBinding?.autofillSuggestionsHolder?.childCount ?: 0) > 0
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.7.10'
|
ext.kotlin_version = '1.9.0'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -9,7 +9,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
classpath 'com.android.tools.build:gradle:8.1.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
org.gradle.jvmargs=-Xmx4g
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Tue Jan 04 09:48:27 CET 2022
|
#Tue Jan 04 09:48:27 CET 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
Loading…
x
Reference in New Issue
Block a user