From 9beac92c673f68c34ecf0858d6befd165102654a Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 23 Oct 2011 14:23:18 +0400 Subject: [PATCH] zeros + degree symbol --- res/layout/calc_plus_button.xml | 2 +- res/layout/calc_zero_digit_button.xml | 3 +-- .../solovyev/android/view/widgets/DirectionDragButton.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/res/layout/calc_plus_button.xml b/res/layout/calc_plus_button.xml index 95bc03a4..17c9dbe6 100644 --- a/res/layout/calc_plus_button.xml +++ b/res/layout/calc_plus_button.xml @@ -9,7 +9,7 @@ xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" a:id="@+id/plusButton" calc:directionTextScale="0.5" - + calc:textUp="°" a:text="+" style="?digitButtonStyle" a:onClick="digitButtonClickHandler"/> \ No newline at end of file diff --git a/res/layout/calc_zero_digit_button.xml b/res/layout/calc_zero_digit_button.xml index 794d1f56..21485d08 100644 --- a/res/layout/calc_zero_digit_button.xml +++ b/res/layout/calc_zero_digit_button.xml @@ -10,8 +10,7 @@ xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" a:id="@+id/zeroDigitButton" a:text="0" calc:textUp="." - calc:textDown="," + calc:textDown="000" calc:directionTextScale="0.5" - style="?digitButtonStyle" a:onClick="digitButtonClickHandler"/> \ No newline at end of file diff --git a/src/main/java/org/solovyev/android/view/widgets/DirectionDragButton.java b/src/main/java/org/solovyev/android/view/widgets/DirectionDragButton.java index dd832552..2608e5ff 100644 --- a/src/main/java/org/solovyev/android/view/widgets/DirectionDragButton.java +++ b/src/main/java/org/solovyev/android/view/widgets/DirectionDragButton.java @@ -116,13 +116,13 @@ public class DirectionDragButton extends DragButton { textDownPosition = getTextPosition(upDownTextPaint, basePaint, textDown, getText(), -1, getWidth(), getHeight(), getDirectionTextScale()); } - if (textDownPosition != null && textUpPosition != null) { + /*if (textDownPosition != null && textUpPosition != null) { if (textDownPosition.getX() > textUpPosition.getX()) { textDownPosition.setX(textUpPosition.getX()); } else { textUpPosition.setX(textDownPosition.getX()); } - } + }*/ }