From ac5421a6c0ac084d121ddce15ba962f23841e25a Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Fri, 23 Nov 2012 18:19:31 +0400 Subject: [PATCH] Calculator Onscreen --- calculatorpp/res/values/styles.xml | 4 +++- .../android/calculator/CalculatorEditorFragment.java | 4 ++-- .../android/calculator/onscreen/CalculatorOnscreenView.java | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/calculatorpp/res/values/styles.xml b/calculatorpp/res/values/styles.xml index 4f970b53..1f3f554b 100644 --- a/calculatorpp/res/values/styles.xml +++ b/calculatorpp/res/values/styles.xml @@ -45,8 +45,10 @@ diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java index 7ff785b4..cb15e2c6 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java @@ -53,9 +53,9 @@ public class CalculatorEditorFragment extends SherlockFragment { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getActivity()); final CalculatorPreferences.Gui.Layout layout = CalculatorPreferences.Gui.getLayout(prefs); if (layout == CalculatorPreferences.Gui.Layout.main_calculator_mobile) { - fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(R.layout.calc_editor_mobile, R.string.result); + fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(R.layout.calc_editor_mobile, R.string.editor); } else { - fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(R.layout.calc_editor, R.string.result); + fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(R.layout.calc_editor, R.string.editor); } fragmentHelper.onCreate(this); diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenView.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenView.java index ee2d2bbf..f445ad0f 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenView.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenView.java @@ -162,7 +162,10 @@ public class CalculatorOnscreenView { button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - widgetButton.onClick(context); + widgetButton.onClick(context); + if ( widgetButton == WidgetButton.app ) { + minimize(); + } } }); button.setOnLongClickListener(new View.OnLongClickListener() {