properly open json files

not sure why it works now, while it apparently did not before
This commit is contained in:
Helium314 2024-06-14 18:17:26 +02:00
parent 3eafce9265
commit 753e5fa6a2
2 changed files with 2 additions and 2 deletions

View file

@ -122,7 +122,7 @@ open class KeyboardBuilder<KP : KeyboardParams>(protected val mContext: Context,
row.forEach {
it.setAbsoluteDimensions(currentX, currentY)
if (DebugFlags.DEBUG_ENABLED)
Log.d(TAG, "setting size and position for ${it.mLabel}, ${it.mCode}: x ${currentX.toInt()}, w ${it.mAbsoluteWidth.toInt()}")
Log.d(TAG, "setting size and position for ${it.mLabel ?: it.mIconName}, ${it.mCode}: x ${currentX.toInt()}, w ${it.mAbsoluteWidth.toInt()}")
currentX += it.mAbsoluteWidth
}
currentY += row.first().mAbsoluteHeight

View file

@ -209,7 +209,7 @@ class LanguageSettingsFragment : Fragment(R.layout.language_settings) {
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT)
.addCategory(Intent.CATEGORY_OPENABLE)
// todo: any working way to allow only json and text files?
.putExtra(Intent.EXTRA_MIME_TYPES, arrayOf("text/*", "application/octet-stream")) // doesn't allow opening json files with "application/json"
.putExtra(Intent.EXTRA_MIME_TYPES, arrayOf("text/*", "application/octet-stream", "application/json"))
.setType("*/*")
layoutFilePicker.launch(intent)
}