From 6c095e0552c0525944720daa52c307fc227a0293 Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 8 Mar 2016 23:23:33 +0100 Subject: [PATCH] Use material arrows --- .../keyboard/PartialKeyboardUi.java | 22 ++++++++---------- .../ic_keyboard_arrow_left_white_48dp.png | Bin 0 -> 226 bytes .../ic_keyboard_arrow_right_white_48dp.png | Bin 0 -> 227 bytes .../ic_keyboard_arrow_left_white_48dp.png | Bin 0 -> 164 bytes .../ic_keyboard_arrow_right_white_48dp.png | Bin 0 -> 163 bytes .../ic_keyboard_arrow_left_white_48dp.png | Bin 0 -> 203 bytes .../ic_keyboard_arrow_right_white_48dp.png | Bin 0 -> 233 bytes .../ic_keyboard_arrow_left_white_48dp.png | Bin 0 -> 285 bytes .../ic_keyboard_arrow_right_white_48dp.png | Bin 0 -> 286 bytes .../ic_keyboard_arrow_left_white_48dp.png | Bin 0 -> 349 bytes .../ic_keyboard_arrow_right_white_48dp.png | Bin 0 -> 354 bytes .../main/res/layout/cpp_app_button_left.xml | 9 ++++--- .../main/res/layout/cpp_app_button_right.xml | 9 ++++--- 13 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_keyboard_arrow_left_white_48dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_keyboard_arrow_right_white_48dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_keyboard_arrow_left_white_48dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_keyboard_arrow_right_white_48dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_keyboard_arrow_left_white_48dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_keyboard_arrow_right_white_48dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_keyboard_arrow_left_white_48dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_keyboard_arrow_right_white_48dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_keyboard_arrow_left_white_48dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_keyboard_arrow_right_white_48dp.png diff --git a/app/src/main/java/org/solovyev/android/calculator/keyboard/PartialKeyboardUi.java b/app/src/main/java/org/solovyev/android/calculator/keyboard/PartialKeyboardUi.java index cfd4d868..2c98b27c 100644 --- a/app/src/main/java/org/solovyev/android/calculator/keyboard/PartialKeyboardUi.java +++ b/app/src/main/java/org/solovyev/android/calculator/keyboard/PartialKeyboardUi.java @@ -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); diff --git a/app/src/main/res/drawable-hdpi/ic_keyboard_arrow_left_white_48dp.png b/app/src/main/res/drawable-hdpi/ic_keyboard_arrow_left_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..d8af01c85ab1fbed7f641baf3b0fee50b79b74ff GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhawR(iTPhGg7(d*du`lLG^5BG(4C zyFz~*1$EAL_iB`U+B0zlXPgPoNgvkxncv@rO`Qn@e|Jm~5lcVOptv-}Lx>~uiGhdy z9F>=wl?o^6c5j|+eDLOG3wE*PX@z|{=Q@vOM$Fkfhtu!$qms|}UT!x(H`UB&5_kWV zj~;7Penf7O2~y^?b80ZowOkT)Dg09Hwe5e|UrscA>D+cu(zDh~bh(Jg@iRd1X1^_? Y`On}(7bdyL0UgcY>FVdQ&MBb@0B}oQssI20 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_keyboard_arrow_right_white_48dp.png b/app/src/main/res/drawable-hdpi/ic_keyboard_arrow_right_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..e9bc3889e0263bff935d25ad2368f91bb64e9f7b GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhawR(ZNOhGg7(dv&*9Qvd^NpwY>k zlly;YUXu*eJeb8Jx+wdQ1=At!`=RC97B|&61%cqN*Da0WM>(M@w0!STHO+!Ab}~bR;9J?n6v1p z=9EK)Ph%eN6r3xlvQ(b?poU+)-S~i|RH0ptlHPLXuJf4_Y%KIA@h?}iEbIV+7yeaD YJEW3&7S3+&0lJ#O)78&qol`;+06LLbwEzGB literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_keyboard_arrow_left_white_48dp.png b/app/src/main/res/drawable-mdpi/ic_keyboard_arrow_left_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..2b4d614a17813189eca5158c7df64b8b06613bc1 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DY)==*kch)?FYo4Ta1dyD=y=fR z3)eNJ8kT8^s*9%flq-mHvd4y3NO#GZ>y8IVpF+_r<68M;MGZ8_3C3C?EM^dG{gE OS_V&7KbLh*2~7Zs%S0#u literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_keyboard_arrow_right_white_48dp.png b/app/src/main/res/drawable-mdpi/ic_keyboard_arrow_right_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..aa55964e73db339eb94e30b751b8ee3cf183eecd GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DEKe85kch)?&mQD;aA07)XuF6Z z>Q8%2hTMq11H*W9PAo@e;k7hy~$2rUL@F^m<{vOd#UNM6)g~c{ps;SM_e~nt4 z(-nV#)9M|z!p%%CKG_NG{r*q=ci1leMh~HP#tU!HZz*~|r}z<{Vv9`Vfyhe=KwB9+ MUHx3vIVCg!0BGzwyZ`_I literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_keyboard_arrow_left_white_48dp.png b/app/src/main/res/drawable-xhdpi/ic_keyboard_arrow_left_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..36cfbc9a904ad0126a126ea5752d73d08faa89fe GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%xcgCV9FzhE&{odwsW{BcnviMSJ)D zFAod7ofoW~%JEKO;)z+sS~v9XNCH(d)WuKJx%+wY6}3IjwyUjqX0Ep9Y`*so1A9-t zyPx0RoRz=tXYXh8XS4s`{WJULv)T78{%7s``K+AHW>a?k9w8Nv2?~x)ESw<5hvS^T xXFh9rTvF+6;X6On>G7Y?LzPvjCsRSTG^n?DGDja<L(SB+ zeJ%wTrqxZ^bj5KVcW29Po1go*?$zI(JJS%ToZ-jbHAbfA=NF$0nmxgCx{9Xni8Pw?JTE4_s7GB%;HgcAmz;|# z|Ds9kfhU_+JhAMUSFvf@j>iX^+4<#cWIxt?cmQFBKic^a!m3zz=<_kKbj61+%qH$v zSNGnL=l*q!Sy0KPLqO4~g##DEYIa7+f+h}suPu*Gc6?akQW3PM^o952NiW*fl@A3A iJe-K^P!&(9<+68Pd|fzEZZQYYzYLzPelF{r5}E+)er+EB literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_keyboard_arrow_right_white_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_keyboard_arrow_right_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..25503d1b49f1382d10f694205e1a785012ca7d80 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ(Knr=Bj3Ar-gYUf9jay@0VeDybd z+pb-4jeei zAnMR$V<*hxc*vP0a#oKu=i5y{)u>>??9wpNQ-6$;9cSNfvf0mCS;zh9kJyu+x+gwI zPk6pv;e5X1JfOt?Gu3=uQ-A7roz%Dgbh`h~C*}Qra%TQtGXu;z0Tg_1^WVGf=TrB( zpA+Njo=l&g`+2^|WDrXpB3Qqj*{(SB3=_A=<^xPebv8H{a_a<;&VBG+Tt-w|{LU3E z@e}j)CfLUogs+HEsNd!AujHWf)S|{eFPVN`X7yJ+#rlaE)u%w-0seh%i&Af_Uv?o1 OBK4 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_keyboard_arrow_right_white_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_keyboard_arrow_right_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..034a3eff4dc443ac589699f86d6d697bf20c480a GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvG8AvYpRA>UE3<7*YT!Hj|Qh>EDivds%e@T#E zFhj#fi}xQ)7>!Mvn_6TVdoHF;14>=;ba4!+hlL4CeQr``(An{)ZV)7>9CXF|cvg=|qj^Bcd-?G!qty7?f( zlz?+HH6ChLPi0xqGT&!Pz`CC+5*em_n0``dTJ)@fNf#z7B>D?KyR6_bVZ&igY0mE| z9uW^(9#?Y+0U3vxH(!0-&B7s|;LyOp$OL8_(C6uBWclJIc7fBM!7Ibj^gx5(3x;U{ o%sFpBWNywuvnw+k(qO=RW9^jKb0LbQK;JQVy85}Sb4q9e0D^I%=l}o! literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/cpp_app_button_left.xml b/app/src/main/res/layout/cpp_app_button_left.xml index a186743d..f616ebbd 100644 --- a/app/src/main/res/layout/cpp_app_button_left.xml +++ b/app/src/main/res/layout/cpp_app_button_left.xml @@ -22,12 +22,11 @@ ~ Site: http://se.solovyev.org --> - \ No newline at end of file diff --git a/app/src/main/res/layout/cpp_app_button_right.xml b/app/src/main/res/layout/cpp_app_button_right.xml index 07e39ae8..6983f4ce 100644 --- a/app/src/main/res/layout/cpp_app_button_right.xml +++ b/app/src/main/res/layout/cpp_app_button_right.xml @@ -22,12 +22,11 @@ ~ Site: http://se.solovyev.org --> - \ No newline at end of file