Use material arrows
@ -9,9 +9,10 @@ import android.support.annotation.Nullable;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import butterknife.Bind;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import jscl.NumeralBase;
|
||||||
import org.solovyev.android.calculator.Engine;
|
import org.solovyev.android.calculator.Engine;
|
||||||
import org.solovyev.android.calculator.Preferences;
|
import org.solovyev.android.calculator.Preferences;
|
||||||
import org.solovyev.android.calculator.R;
|
import org.solovyev.android.calculator.R;
|
||||||
@ -19,30 +20,25 @@ import org.solovyev.android.calculator.buttons.CppSpecialButton;
|
|||||||
import org.solovyev.android.calculator.view.EditorLongClickEraser;
|
import org.solovyev.android.calculator.view.EditorLongClickEraser;
|
||||||
import org.solovyev.android.calculator.view.NumeralBasesButton;
|
import org.solovyev.android.calculator.view.NumeralBasesButton;
|
||||||
import org.solovyev.android.views.dragbutton.DirectionDragButton;
|
import org.solovyev.android.views.dragbutton.DirectionDragButton;
|
||||||
|
import org.solovyev.android.views.dragbutton.DirectionDragImageButton;
|
||||||
import org.solovyev.android.views.dragbutton.DragDirection;
|
import org.solovyev.android.views.dragbutton.DragDirection;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import butterknife.Bind;
|
|
||||||
import butterknife.ButterKnife;
|
|
||||||
import jscl.NumeralBase;
|
|
||||||
|
|
||||||
import static org.solovyev.android.calculator.Engine.Preferences.numeralBase;
|
import static org.solovyev.android.calculator.Engine.Preferences.numeralBase;
|
||||||
import static org.solovyev.android.calculator.Preferences.Gui.showEqualsButton;
|
import static org.solovyev.android.calculator.Preferences.Gui.showEqualsButton;
|
||||||
import static org.solovyev.android.calculator.Preferences.Gui.vibrateOnKeypress;
|
import static org.solovyev.android.calculator.Preferences.Gui.vibrateOnKeypress;
|
||||||
import static org.solovyev.android.views.dragbutton.DragDirection.down;
|
import static org.solovyev.android.views.dragbutton.DragDirection.*;
|
||||||
import static org.solovyev.android.views.dragbutton.DragDirection.left;
|
|
||||||
import static org.solovyev.android.views.dragbutton.DragDirection.up;
|
|
||||||
|
|
||||||
public class PartialKeyboardUi extends BaseKeyboardUi {
|
public class PartialKeyboardUi extends BaseKeyboardUi {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Bind(R.id.cpp_button_right)
|
@Bind(R.id.cpp_button_right)
|
||||||
DirectionDragButton rightButton;
|
DirectionDragImageButton rightButton;
|
||||||
@Nullable
|
@Nullable
|
||||||
@Bind(R.id.cpp_button_left)
|
@Bind(R.id.cpp_button_left)
|
||||||
DirectionDragButton leftButton;
|
DirectionDragImageButton leftButton;
|
||||||
@Nullable
|
@Nullable
|
||||||
@Bind(R.id.cpp_button_clear)
|
@Bind(R.id.cpp_button_clear)
|
||||||
NumeralBasesButton clearButton;
|
NumeralBasesButton clearButton;
|
||||||
@ -140,8 +136,10 @@ public class PartialKeyboardUi extends BaseKeyboardUi {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.cpp_button_left:
|
case R.id.cpp_button_left:
|
||||||
|
onClick(v, CppSpecialButton.cursor_left);
|
||||||
|
break;
|
||||||
case R.id.cpp_button_right:
|
case R.id.cpp_button_right:
|
||||||
onClick(v, ((Button) v).getText().toString());
|
onClick(v, CppSpecialButton.cursor_right);
|
||||||
break;
|
break;
|
||||||
case R.id.cpp_button_clear:
|
case R.id.cpp_button_clear:
|
||||||
onClick(v, CppSpecialButton.clear);
|
onClick(v, CppSpecialButton.clear);
|
||||||
|
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 164 B |
After Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 203 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 349 B |
After Width: | Height: | Size: 354 B |
@ -22,12 +22,11 @@
|
|||||||
~ Site: http://se.solovyev.org
|
~ Site: http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<org.solovyev.android.views.dragbutton.DirectionDragButton
|
<org.solovyev.android.views.dragbutton.DirectionDragImageButton a:id="@id/cpp_button_left"
|
||||||
|
style="?attr/cpp_button_style_control"
|
||||||
xmlns:a="http://schemas.android.com/apk/res/android"
|
xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res-auto"
|
xmlns:c="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
a:id="@id/cpp_button_left"
|
a:src="@drawable/ic_keyboard_arrow_left_white_48dp"
|
||||||
style="?attr/cpp_button_style_control"
|
c:directionTextUp="<<"
|
||||||
a:text="◁"
|
|
||||||
c:directionTextUp="◁◁"
|
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
@ -22,12 +22,11 @@
|
|||||||
~ Site: http://se.solovyev.org
|
~ Site: http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<org.solovyev.android.views.dragbutton.DirectionDragButton
|
<org.solovyev.android.views.dragbutton.DirectionDragImageButton a:id="@id/cpp_button_right"
|
||||||
|
style="?attr/cpp_button_style_control"
|
||||||
xmlns:a="http://schemas.android.com/apk/res/android"
|
xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:c="http://schemas.android.com/apk/res-auto"
|
xmlns:c="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
a:id="@id/cpp_button_right"
|
a:src="@drawable/ic_keyboard_arrow_right_white_48dp"
|
||||||
style="?attr/cpp_button_style_control"
|
c:directionTextUp=">>"
|
||||||
a:text="▷"
|
|
||||||
c:directionTextUp="▷▷"
|
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|