Calculator Onscreen

This commit is contained in:
Sergey Solovyev
2012-11-23 18:19:31 +04:00
parent b71a21a05f
commit ac5421a6c0
3 changed files with 9 additions and 4 deletions

View File

@@ -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);

View File

@@ -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() {