mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-03-28 01:10:32 +01:00
22 lines
611 B
Kotlin
22 lines
611 B
Kotlin
package com.simplemobiletools.keyboard.dialogs
|
|
|
|
import android.view.View
|
|
import com.simplemobiletools.keyboard.extensions.config
|
|
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguages
|
|
|
|
class ChangeLanguagePopup(
|
|
inputView: View,
|
|
private val onSelect: () -> Unit,
|
|
) {
|
|
private val context = inputView.context
|
|
private val config = context.config
|
|
|
|
init {
|
|
val items = context.getKeyboardLanguages()
|
|
KeyboardRadioGroupDialog(inputView, items, config.keyboardLanguage) {
|
|
config.keyboardLanguage = it as Int
|
|
onSelect.invoke()
|
|
}
|
|
}
|
|
}
|