This commit is contained in:
Sergey Solovyev 2012-01-15 02:40:08 +04:00
parent 7101258662
commit f996d3a954
33 changed files with 47 additions and 45 deletions

View File

@ -24,7 +24,7 @@
<LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/leftButton"
c:textUp="◀◀"
@ -67,7 +67,7 @@
a:layout_height="fill_parent"
a:layout_weight="1"/>
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/rightButton"
c:textUp="▶▶"

View File

@ -18,7 +18,7 @@
<LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/leftButton"
c:textUp="◀◀"
@ -61,7 +61,7 @@
a:layout_height="fill_parent"
a:layout_weight="1"/>
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/rightButton"
c:textUp="▶▶"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/divisionButton"
c:textUp="%"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/squareBracketsButton"
a:text="."

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/eightDigitButton" a:text="8"
c:textUp="ln"

View File

@ -5,6 +5,6 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
style="?controlButtonStyle"/>

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton
<org.solovyev.android.view.drag.DirectionDragButton
xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/equalsButton"

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/fiveDigitButton"
a:text="5"

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/fourDigitButton"
a:text="4"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/functionsButton"
a:text="ƒ(x)"

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/historyButton"
a:text="@string/c_history_button"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/leftButton"
c:textUp="◀◀"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/multiplicationButton"
a:text="×"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/nineDigitButton" a:text="9"
c:textDown="e"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/oneDigitButton"
a:text="1"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/functionsButton"
a:text="∂,…"
a:onClick="operatorsButtonClickHandler"

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/plusButton"
c:directionTextScale="0.5"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/rightButton"
c:textUp="▶▶"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/roundBracketsButton"
c:textUp="("

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/sevenDigitButton" a:text="7"
c:textUp="i"

View File

@ -5,7 +5,7 @@
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/subtractionButton"
c:textDown="∂,…"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/threeDigitButton"
a:text="3"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/twoDigitButton"
a:text="2"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/varsButton"
c:directionTextScale="0.5"

View File

@ -6,7 +6,7 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
<org.solovyev.android.view.drag.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:id="@+id/zeroDigitButton"
c:textUp="00"

View File

@ -21,7 +21,7 @@
a:layout_width="80dp"
a:layout_height="80dp"/>
<org.solovyev.android.view.DirectionDragButton a:id="@+id/calibrationButtonLeft"
<org.solovyev.android.view.drag.DirectionDragButton a:id="@+id/calibrationButtonLeft"
a:text=""
c:textUp="@string/c_up"
c:textDown="@string/c_down"
@ -29,7 +29,7 @@
a:layout_height="80dp"
style="?digitButtonStyle"/>
<org.solovyev.android.view.DirectionDragButton a:id="@+id/calibrationButtonRight"
<org.solovyev.android.view.drag.DirectionDragButton a:id="@+id/calibrationButtonRight"
a:text=""
c:textUp="@string/c_up"
c:textDown="@string/c_down"

View File

@ -40,9 +40,11 @@ import org.solovyev.android.calculator.math.MathType;
import org.solovyev.android.calculator.model.CalculatorEngine;
import org.solovyev.android.calculator.view.AngleUnitsButton;
import org.solovyev.android.calculator.view.NumeralBasesButton;
import org.solovyev.android.history.HistoryDragProcessor;
import org.solovyev.android.prefs.IntegerPreference;
import org.solovyev.android.prefs.Preference;
import org.solovyev.android.view.*;
import org.solovyev.android.view.drag.*;
import org.solovyev.common.utils.Announcer;
import org.solovyev.common.utils.Point2d;
import org.solovyev.common.utils.StringUtils;
@ -343,7 +345,7 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
}
@Override
public boolean onDrag(@NotNull DragButton dragButton, @NotNull org.solovyev.android.view.DragEvent event) {
public boolean onDrag(@NotNull DragButton dragButton, @NotNull org.solovyev.android.view.drag.DragEvent event) {
boolean result = super.onDrag(dragButton, event);
if (result) {

View File

@ -23,7 +23,7 @@ import jscl.math.function.IConstant;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.solovyev.android.CursorControl;
import org.solovyev.android.HistoryControl;
import org.solovyev.android.history.HistoryControl;
import org.solovyev.android.calculator.history.CalculatorHistory;
import org.solovyev.android.calculator.history.CalculatorHistoryState;
import org.solovyev.android.calculator.history.TextViewEditorAdapter;

View File

@ -8,10 +8,10 @@ package org.solovyev.android.calculator;
import android.view.MotionEvent;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.CursorControl;
import org.solovyev.android.view.DirectionDragButton;
import org.solovyev.android.view.DragButton;
import org.solovyev.android.view.DragDirection;
import org.solovyev.android.view.SimpleOnDragListener;
import org.solovyev.android.view.drag.DragDirection;
import org.solovyev.android.view.drag.SimpleOnDragListener;
import org.solovyev.android.view.drag.DirectionDragButton;
import org.solovyev.android.view.drag.DragButton;
import org.solovyev.common.utils.Point2d;
/**

View File

@ -7,10 +7,10 @@ package org.solovyev.android.calculator;
import android.view.MotionEvent;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.view.DirectionDragButton;
import org.solovyev.android.view.DragDirection;
import org.solovyev.android.view.DragButton;
import org.solovyev.android.view.SimpleOnDragListener;
import org.solovyev.android.view.drag.DragDirection;
import org.solovyev.android.view.drag.SimpleOnDragListener;
import org.solovyev.android.view.drag.DirectionDragButton;
import org.solovyev.android.view.drag.DragButton;
import org.solovyev.common.utils.Point2d;
/**

View File

@ -8,10 +8,10 @@ package org.solovyev.android.calculator;
import android.view.MotionEvent;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.view.DirectionDragButton;
import org.solovyev.android.view.DragButton;
import org.solovyev.android.view.DragDirection;
import org.solovyev.android.view.SimpleOnDragListener;
import org.solovyev.android.view.drag.DragDirection;
import org.solovyev.android.view.drag.SimpleOnDragListener;
import org.solovyev.android.view.drag.DirectionDragButton;
import org.solovyev.android.view.drag.DragButton;
import org.solovyev.common.utils.Point2d;
/**

View File

@ -14,7 +14,7 @@ import android.util.AttributeSet;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.model.CalculatorEngine;
import org.solovyev.android.view.DirectionDragButton;
import org.solovyev.android.view.drag.DirectionDragButton;
/**
* User: serso

View File

@ -14,7 +14,7 @@ import android.util.AttributeSet;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.model.CalculatorEngine;
import org.solovyev.android.view.DirectionDragButton;
import org.solovyev.android.view.drag.DirectionDragButton;
/**
* User: serso