Fixed cursor arrows issues
This commit is contained in:
parent
4ca3099ef3
commit
a1ee20ad81
@ -24,5 +24,5 @@
|
|||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@id/cpp_button_left"
|
a:id="@id/cpp_button_left"
|
||||||
a:text="◀"
|
a:text="◁"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
@ -24,5 +24,5 @@
|
|||||||
|
|
||||||
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
<Button xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:id="@id/cpp_button_right"
|
a:id="@id/cpp_button_right"
|
||||||
a:text="▶"
|
a:text="▷"
|
||||||
style="@style/cpp_simple_metro_control_button_style"/>
|
style="@style/cpp_simple_metro_control_button_style"/>
|
Binary file not shown.
@ -25,8 +25,8 @@
|
|||||||
<org.solovyev.android.view.drag.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"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@id/cpp_button_left"
|
a:id="@id/cpp_button_left"
|
||||||
c:textUp="◀◀"
|
c:textUp="◁◁"
|
||||||
a:text="◀"
|
a:text="◁"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
style="?cpp_control_button_style"
|
style="?cpp_control_button_style"
|
||||||
a:onClick="digitButtonClickHandler"/>
|
a:onClick="digitButtonClickHandler"/>
|
@ -25,8 +25,8 @@
|
|||||||
<org.solovyev.android.view.drag.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"
|
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
|
||||||
a:id="@id/cpp_button_right"
|
a:id="@id/cpp_button_right"
|
||||||
c:textUp="▶▶"
|
c:textUp="▷▷"
|
||||||
a:text="▶"
|
a:text="▷"
|
||||||
c:directionTextScale="0.5"
|
c:directionTextScale="0.5"
|
||||||
style="?cpp_control_button_style"
|
style="?cpp_control_button_style"
|
||||||
a:onClick="digitButtonClickHandler"/>
|
a:onClick="digitButtonClickHandler"/>
|
@ -23,15 +23,14 @@
|
|||||||
package org.solovyev.android.calculator;
|
package org.solovyev.android.calculator;
|
||||||
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import org.solovyev.android.view.drag.DirectionDragButton;
|
import org.solovyev.android.view.drag.DirectionDragButton;
|
||||||
import org.solovyev.android.view.drag.DragButton;
|
import org.solovyev.android.view.drag.DragButton;
|
||||||
import org.solovyev.android.view.drag.DragDirection;
|
import org.solovyev.android.view.drag.DragDirection;
|
||||||
import org.solovyev.android.view.drag.SimpleOnDragListener;
|
import org.solovyev.android.view.drag.SimpleOnDragListener;
|
||||||
import org.solovyev.common.math.Point2d;
|
import org.solovyev.common.math.Point2d;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User: serso
|
* User: serso
|
||||||
* Date: 9/16/11
|
* Date: 9/16/11
|
||||||
@ -48,10 +47,10 @@ public class CursorDragProcessor implements SimpleOnDragListener.DragProcessor {
|
|||||||
|
|
||||||
if (dragButton instanceof DirectionDragButton) {
|
if (dragButton instanceof DirectionDragButton) {
|
||||||
String text = ((DirectionDragButton) dragButton).getText(dragDirection);
|
String text = ((DirectionDragButton) dragButton).getText(dragDirection);
|
||||||
if ("◀◀".equals(text)) {
|
if ("◁◁".equals(text)) {
|
||||||
Locator.getInstance().getEditor().setCursorOnStart();
|
Locator.getInstance().getEditor().setCursorOnStart();
|
||||||
result = true;
|
result = true;
|
||||||
} else if ("▶▶".equals(text)) {
|
} else if ("▷▷".equals(text)) {
|
||||||
Locator.getInstance().getEditor().setCursorOnEnd();
|
Locator.getInstance().getEditor().setCursorOnEnd();
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,13 @@ public enum CalculatorSpecialButton {
|
|||||||
Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.show_history_detached, null);
|
Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.show_history_detached, null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cursor_right("▶") {
|
cursor_right("▷") {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@Nonnull CalculatorKeyboard keyboard) {
|
public void onClick(@Nonnull CalculatorKeyboard keyboard) {
|
||||||
keyboard.moveCursorRight();
|
keyboard.moveCursorRight();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cursor_left("◀") {
|
cursor_left("◁") {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@Nonnull CalculatorKeyboard keyboard) {
|
public void onClick(@Nonnull CalculatorKeyboard keyboard) {
|
||||||
keyboard.moveCursorLeft();
|
keyboard.moveCursorLeft();
|
||||||
|
Loading…
Reference in New Issue
Block a user