mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-08 15:47:43 +00:00
display "<language> (<layout>)" also for custom layouts
This commit is contained in:
parent
9bd2136ebe
commit
3754b2be82
6 changed files with 21 additions and 7 deletions
|
@ -43,9 +43,9 @@ fun createInputMethodPickerDialog(latinIme: LatinIME, richImm: RichInputMethodMa
|
|||
for (imiAndSubtype in enabledSubtypes) {
|
||||
val (imi, subtype) = imiAndSubtype
|
||||
|
||||
val title = SpannableString(subtype?.getDisplayName(latinIme, imi.packageName, imi.serviceInfo.applicationInfo)
|
||||
?.ifBlank { imi.loadLabel(pm) }
|
||||
?: imi.loadLabel(pm))
|
||||
val subtypeName = if (imi == thisImi) subtype?.displayName(latinIme)
|
||||
else subtype?.getDisplayName(latinIme, imi.packageName, imi.serviceInfo.applicationInfo)
|
||||
val title = SpannableString(subtypeName?.ifBlank { imi.loadLabel(pm) } ?: imi.loadLabel(pm))
|
||||
val subtitle = SpannableString(if (subtype == null) "" else "\n${imi.loadLabel(pm)}")
|
||||
title.setSpan(
|
||||
RelativeSizeSpan(0.9f), 0, title.length,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue