Use material arrows

This commit is contained in:
serso 2016-03-08 23:23:33 +01:00
parent 675626bc77
commit 6c095e0552
13 changed files with 18 additions and 22 deletions

View File

@ -9,9 +9,10 @@ import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import butterknife.Bind;
import butterknife.ButterKnife;
import jscl.NumeralBase;
import org.solovyev.android.calculator.Engine;
import org.solovyev.android.calculator.Preferences;
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.NumeralBasesButton;
import org.solovyev.android.views.dragbutton.DirectionDragButton;
import org.solovyev.android.views.dragbutton.DirectionDragImageButton;
import org.solovyev.android.views.dragbutton.DragDirection;
import javax.annotation.Nonnull;
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.Preferences.Gui.showEqualsButton;
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.left;
import static org.solovyev.android.views.dragbutton.DragDirection.up;
import static org.solovyev.android.views.dragbutton.DragDirection.*;
public class PartialKeyboardUi extends BaseKeyboardUi {
@Nullable
@Bind(R.id.cpp_button_right)
DirectionDragButton rightButton;
DirectionDragImageButton rightButton;
@Nullable
@Bind(R.id.cpp_button_left)
DirectionDragButton leftButton;
DirectionDragImageButton leftButton;
@Nullable
@Bind(R.id.cpp_button_clear)
NumeralBasesButton clearButton;
@ -140,8 +136,10 @@ public class PartialKeyboardUi extends BaseKeyboardUi {
public void onClick(View v) {
switch (v.getId()) {
case R.id.cpp_button_left:
onClick(v, CppSpecialButton.cursor_left);
break;
case R.id.cpp_button_right:
onClick(v, ((Button) v).getText().toString());
onClick(v, CppSpecialButton.cursor_right);
break;
case R.id.cpp_button_clear:
onClick(v, CppSpecialButton.clear);

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

View File

@ -22,12 +22,11 @@
~ 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:c="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
a:id="@id/cpp_button_left"
style="?attr/cpp_button_style_control"
a:text="◁"
c:directionTextUp="◁◁"
a:src="@drawable/ic_keyboard_arrow_left_white_48dp"
c:directionTextUp="&lt;&lt;"
tools:ignore="HardcodedText" />

View File

@ -22,12 +22,11 @@
~ 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:c="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
a:id="@id/cpp_button_right"
style="?attr/cpp_button_style_control"
a:text="▷"
c:directionTextUp="▷▷"
a:src="@drawable/ic_keyboard_arrow_right_white_48dp"
c:directionTextUp="&gt;&gt;"
tools:ignore="HardcodedText" />