From 2536c15cb44a669357bf240251d86a00aa461949 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 21 Feb 2016 14:26:23 +0100 Subject: [PATCH] Fix --- .../org/solovyev/android/calculator/Preferences.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/solovyev/android/calculator/Preferences.java b/app/src/main/java/org/solovyev/android/calculator/Preferences.java index 4f25ca92..0a4ed61c 100644 --- a/app/src/main/java/org/solovyev/android/calculator/Preferences.java +++ b/app/src/main/java/org/solovyev/android/calculator/Preferences.java @@ -76,10 +76,13 @@ public final class Preferences { //noinspection deprecation Gui.vibrateOnKeypress.putPreference(editor, Gui.hapticFeedback.getPreference(preferences) > 0); } - Gui.Layout layout = Gui.layout.getPreference(preferences); - //noinspection deprecation - if (layout == Gui.Layout.main_cellphone || layout == Gui.Layout.main_calculator_mobile || layout == Gui.Layout.simple_mobile) { + final Gui.Layout layout = Gui.layout.getPreference(preferences); + if (layout == Gui.Layout.main_cellphone) { Gui.layout.putDefault(editor); + } else if (layout == Gui.Layout.main_calculator_mobile) { + Gui.layout.putPreference(editor, Gui.Layout.main_calculator); + } else if (layout == Gui.Layout.simple_mobile) { + Gui.layout.putPreference(editor, Gui.Layout.simple); } editor.apply(); }