mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 16:46:35 +00:00
minor cleanup and add comment
This commit is contained in:
parent
7473d5b32b
commit
0f503389b3
4 changed files with 3 additions and 5 deletions
|
@ -10,7 +10,6 @@ import android.content.res.TypedArray;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import helium314.keyboard.latin.R;
|
import helium314.keyboard.latin.R;
|
||||||
import helium314.keyboard.latin.settings.Settings;
|
|
||||||
|
|
||||||
public final class KeyPreviewDrawParams {
|
public final class KeyPreviewDrawParams {
|
||||||
// XML attributes of {@link MainKeyboardView}.
|
// XML attributes of {@link MainKeyboardView}.
|
||||||
|
|
|
@ -11,7 +11,6 @@ import helium314.keyboard.keyboard.internal.KeyboardParams
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyData
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyData
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyType
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyType
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.SimplePopups
|
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.TextKeyData
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.TextKeyData
|
||||||
import helium314.keyboard.latin.common.isEmoji
|
import helium314.keyboard.latin.common.isEmoji
|
||||||
import helium314.keyboard.latin.define.DebugFlags
|
import helium314.keyboard.latin.define.DebugFlags
|
||||||
|
|
|
@ -108,10 +108,11 @@ sealed interface KeyData : AbstractKeyData {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSpaceLabel(params: KeyboardParams): String =
|
private fun getSpaceLabel(params: KeyboardParams): String =
|
||||||
if (params.mId.mElementId <= KeyboardId.ELEMENT_SYMBOLS_SHIFTED)
|
if (params.mId.isAlphaOrSymbolKeyboard)
|
||||||
"!icon/space_key|!code/key_space"
|
"!icon/space_key|!code/key_space"
|
||||||
else "!icon/space_key_for_number_layout|!code/key_space"
|
else "!icon/space_key_for_number_layout|!code/key_space"
|
||||||
|
|
||||||
|
// todo: emoji and language switch popups should actually disappear depending on current layout (including functional keys)
|
||||||
private fun getCommaPopupKeys(params: KeyboardParams): List<String> {
|
private fun getCommaPopupKeys(params: KeyboardParams): List<String> {
|
||||||
val keys = mutableListOf<String>()
|
val keys = mutableListOf<String>()
|
||||||
if (!params.mId.mDeviceLocked)
|
if (!params.mId.mDeviceLocked)
|
||||||
|
|
|
@ -11,7 +11,6 @@ import java.io.IOException
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.io.UnsupportedEncodingException
|
import java.io.UnsupportedEncodingException
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
import java.util.HashMap
|
|
||||||
import java.util.jar.JarFile
|
import java.util.jar.JarFile
|
||||||
import kotlin.RuntimeException
|
import kotlin.RuntimeException
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ object JarUtils {
|
||||||
fun close(stream: Closeable?) {
|
fun close(stream: Closeable?) {
|
||||||
try {
|
try {
|
||||||
stream?.close()
|
stream?.close()
|
||||||
} catch (e: IOException) {
|
} catch (_: IOException) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue