mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix empty custom input style entry appears after orientation change" into jb-dev
This commit is contained in:
commit
b4b3e80f11
@ -131,6 +131,7 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
|
|||||||
|
|
||||||
private interface SubtypeDialogProxy {
|
private interface SubtypeDialogProxy {
|
||||||
public void onRemovePressed(SubtypePreference subtypePref);
|
public void onRemovePressed(SubtypePreference subtypePref);
|
||||||
|
public void onAddPressed(SubtypePreference subtypePref);
|
||||||
public SubtypeLocaleAdapter getSubtypeLocaleAdapter();
|
public SubtypeLocaleAdapter getSubtypeLocaleAdapter();
|
||||||
public KeyboardLayoutSetAdapter getKeyboardLayoutSetAdapter();
|
public KeyboardLayoutSetAdapter getKeyboardLayoutSetAdapter();
|
||||||
}
|
}
|
||||||
@ -241,6 +242,7 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
|
|||||||
super.onClick(dialog, which);
|
super.onClick(dialog, which);
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case DialogInterface.BUTTON_POSITIVE:
|
case DialogInterface.BUTTON_POSITIVE:
|
||||||
|
final boolean addPressed = isIncomplete();
|
||||||
final SubtypeLocaleItem locale =
|
final SubtypeLocaleItem locale =
|
||||||
(SubtypeLocaleItem) mSubtypeLocaleSpinner.getSelectedItem();
|
(SubtypeLocaleItem) mSubtypeLocaleSpinner.getSelectedItem();
|
||||||
final KeyboardLayoutSetItem layout =
|
final KeyboardLayoutSetItem layout =
|
||||||
@ -249,6 +251,9 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
|
|||||||
locale.first, layout.first, ASCII_CAPABLE);
|
locale.first, layout.first, ASCII_CAPABLE);
|
||||||
setSubtype(subtype);
|
setSubtype(subtype);
|
||||||
notifyChanged();
|
notifyChanged();
|
||||||
|
if (addPressed) {
|
||||||
|
mProxy.onAddPressed(this);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogInterface.BUTTON_NEUTRAL:
|
case DialogInterface.BUTTON_NEUTRAL:
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
@ -390,6 +395,11 @@ public class AdditionalSubtypeSettings extends PreferenceFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAddPressed(SubtypePreference subtypePref) {
|
||||||
|
mIsAddingNewSubtype = false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SubtypeLocaleAdapter getSubtypeLocaleAdapter() {
|
public SubtypeLocaleAdapter getSubtypeLocaleAdapter() {
|
||||||
return mSubtypeLocaleAdapter;
|
return mSubtypeLocaleAdapter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user