mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-26 01:03:24 +01:00
Show the switching key if there's several languages
Ensure the switching key is shown when there's several subtypes enabled, even if Android says not to show it.
This commit is contained in:
parent
2dae2105b2
commit
2eb615dbf6
@ -92,11 +92,12 @@ public class Keyboard2 extends InputMethodService
|
||||
private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype)
|
||||
{
|
||||
HashSet<String> extra_keys = new HashSet<String>();
|
||||
List<InputMethodSubtype> enabled_subtypes = getEnabledSubtypes(imm);
|
||||
switch (_config.accents)
|
||||
{
|
||||
case 1:
|
||||
extra_keys_of_subtype(extra_keys, subtype);
|
||||
for (InputMethodSubtype s : getEnabledSubtypes(imm))
|
||||
for (InputMethodSubtype s : enabled_subtypes)
|
||||
extra_keys_of_subtype(extra_keys, s);
|
||||
break;
|
||||
case 2:
|
||||
@ -107,6 +108,8 @@ public class Keyboard2 extends InputMethodService
|
||||
default: throw new IllegalArgumentException();
|
||||
}
|
||||
_config.extra_keys = extra_keys;
|
||||
if (enabled_subtypes.size() > 1)
|
||||
_config.shouldOfferSwitchingToNextInputMethod = true;
|
||||
}
|
||||
|
||||
private void refreshSubtypeLegacyFallback()
|
||||
|
Loading…
Reference in New Issue
Block a user