From 1e79a289df07c3a81d2e7422e03a3cda8cdf0ddf Mon Sep 17 00:00:00 2001 From: Gongxter Date: Mon, 1 Feb 2016 16:23:54 +0100 Subject: [PATCH 1/2] rating bar edited --- .../ui/MainActivity.java | 4 +- .../ui/view/SudokuKeyboardLayout.java | 8 +- app/src/main/res/drawable/numfirst.png | Bin 0 -> 4471 bytes app/src/main/res/drawable/numfull.png | Bin 0 -> 4726 bytes .../res/layout-land/activity_main_menu.xml | 4 +- .../layout-xlarge-land/win_screen_layout.xml | 161 ++++++++++++ .../res/layout-xlarge/activity_main_menu.xml | 240 ++++++++++++++++++ .../main/res/layout/activity_main_menu.xml | 6 +- app/src/main/res/layout/win_screen_layout.xml | 3 +- app/src/main/res/values/styles.xml | 2 + app/src/main/res/xml/pref_help_general.xml | 4 +- 11 files changed, 420 insertions(+), 12 deletions(-) create mode 100644 app/src/main/res/drawable/numfirst.png create mode 100644 app/src/main/res/drawable/numfull.png create mode 100644 app/src/main/res/layout-xlarge-land/win_screen_layout.xml create mode 100644 app/src/main/res/layout-xlarge/activity_main_menu.xml diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java index 8f9242a..ae7a9fb 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -118,11 +118,11 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On }); GameDifficulty lastChosenDifficulty = GameDifficulty.valueOf(settings.getString("lastChosenDifficulty", "Easy")); difficultyBar.setRating(GameDifficulty.getValidDifficultyList().indexOf(lastChosenDifficulty) + 1); - LayerDrawable stars = (LayerDrawable)difficultyBar.getProgressDrawable(); + /*LayerDrawable stars = (LayerDrawable)difficultyBar.getProgressDrawable(); stars.getDrawable(2).setColorFilter(getResources().getColor(R.color.colorPrimary), PorterDuff.Mode.SRC_ATOP);//Color for Stars fully selected stars.getDrawable(1).setColorFilter(getResources().getColor(R.color.middleblue), PorterDuff.Mode.SRC_ATOP);//Color for Stars partially selected stars.getDrawable(0).setColorFilter(getResources().getColor(R.color.lightblue), PorterDuff.Mode.SRC_ATOP);//color for stars not selected - + */ // on first create always check for loadable levels! SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("savesChanged", true); diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java index 1ee3023..39fa61a 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java @@ -26,7 +26,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan SudokuButton [] buttons; GameController gameController; Symbol symbolsToUse = Symbol.Default; - float normalTextSize = 30; // in dp + float normalTextSize = 30; // in sp LinearLayout [] layouts = new LinearLayout[2]; OnClickListener listener = new OnClickListener() { @@ -115,7 +115,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan buttons[buttonIndex].setTextColor(getResources().getColor(R.color.white)); buttons[buttonIndex].setBackgroundResource(R.drawable.mnenomic_numpad_button); buttons[buttonIndex].setText(Symbol.getSymbol(symbolsToUse, buttonIndex)); - buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_DIP,normalTextSize); + buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_SP,normalTextSize); buttons[buttonIndex].setValue(buttonIndex + 1); buttons[buttonIndex].setOnClickListener(listener); @@ -146,9 +146,9 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan public void updateNotesEnabled() { if(gameController.getNoteStatus()) { - setTextSize(TypedValue.COMPLEX_UNIT_DIP,normalTextSize*0.55f); + setTextSize(TypedValue.COMPLEX_UNIT_SP,normalTextSize*0.55f); } else { - setTextSize(TypedValue.COMPLEX_UNIT_DIP,normalTextSize); + setTextSize(TypedValue.COMPLEX_UNIT_SP,normalTextSize); } } diff --git a/app/src/main/res/drawable/numfirst.png b/app/src/main/res/drawable/numfirst.png new file mode 100644 index 0000000000000000000000000000000000000000..ab44980151d0ab153f8f8e31dd2e43a23245eb38 GIT binary patch literal 4471 zcmeHL`9IWa8y+ELFCx1-l{%78wqYDeWG#vgLW!{+WX){ol$4Z&EHf%aDPtM?G6vNg z>&TL0o5495>kJJuqZu>rw{uMAy#K)a)BD3L-}yZE+}HEm*L^+D^`xG2vXK&376*Yq zQfF;XyMRDK=Ya2o9ovBS$^5rBfDfT47n@TcY@g~p@E`)UbhHG4Dj!I2uZRNAJ0om= zjsk(CJHEYyh~clUfk3+?&z`ot5bwQ=MucWTl|DFfh{g8|^px-K{N<48q*u1F!5Zm22#XxY%I~n(ly~1dXIHzwNcM?=VW8*R3MVbAv8q)^BIK!L*N4Q_;WEOr zMKSG)><2D}2yxaF63f6);r&r$MuE3G)~n%EJejpg9pOxvmn>5o58qWjv42JWZJQmgV9}vvPzF> zI)@ujXL6I?RN>na5B)Zo=pu%%DJ!Z@=tT?`CW*ZaGIcbpSDJIGt&#Y(Q`>q<@$D1c;F&W)Wy{4vaCTpC)m?pctjJ)ByvCHW%x zjq7TXk&ju==c(-{9HCjgwoZQ{n%IPVMahVuykcB`z`R1BpSJXhtAcxnbx>ZPhhnyl zVzl3HqVSCc#|V=go1PvO-0^Uii@c${=AbuUpr1bP8J<-fW@>@Kuqwn@Y4d9m)zKSc zG@A<-R-958r?D2i2$YjZX)o>HWqP~vFYR;gyrw^xaqHrZAD}-ZSmI&rUP8vUdP%xv z*jo~!rYNq<`n82cIWU-$$cnTVBK)L#>Aconnzx`9@7GTe;Qkb$+0bzjFi`uZ@H5dFRsA7P6WIS||* zAzW};(G3~vekfDPMZs8W4edC}TJ?)DuKmFW&vvarZlw6x1;S@T1}rOTP4{ z9!#!w0j*e_+0%A*nM({Fx}56}5N}emePzf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?5i^tuP#UgEoPwzq%;ZMx%uY$&5{OKE zu*yTxpqHSj6sMy}nb}$wJ2!Vv=mFkga8N4kPRW-R(Z5gS9d{Ml&UX7Lc()n>k$Ob4 zoAEzVEQ%Z+x`~63Yt7ezqyD=dd6pD#>P}kzAz(kIYx^}zk0T)V-Nv$r-R6}uxF-GF zo`+Ta>j~ugD!k>lIKWSeYkidIU1;@r#MutGo}ZW*xLpq8e@Dg_af+K_h5z8L+Lv1h zWp?&Nq7)6a}^qSX!lD;oIm_!;j#b=w-2yzAzW3!!X2CHb`MVu zX)wDQz$bzZUHoj})sgo~+!icV=ZBpUsA)KfaAD9AL# z+&{ABsftx(qS0N(Sx>-+cF4%@SS-mbEy@b;CQeCCC_ z1Qm2>h;Es;9E-XTn5TYNWkNE#EKF_Nl`nQ`?2zEpYPU~DX&84TKdlNTVRt+2$GZ$z zcu-zCR5-&jXztx3;I2T@Yfp@)9KWx?N*H8jeI9@3`>n!(ZO-R!+KOPFZ_n6aW-YaU mSNvV&)8DQi0*8jzQNw=yojTl~PXm`FptIIar?IDelm7!PX607^ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/numfull.png b/app/src/main/res/drawable/numfull.png new file mode 100644 index 0000000000000000000000000000000000000000..a10417280d8ac741ad5461322af6b1b0b94af46e GIT binary patch literal 4726 zcmd5=`9IWa`=6|p%$&->$ucdnhHQ;x7*a$BWzSmX$P&iBYmO)-qAbbM2t%^Wu?`vQ z9E6OrufrhwF!o_E&qsBh*K_`X@9X=+EcZ3{eP8pruj_qX@Av)emZ2{9@iWIkAP~3S zjcdjr(2-lf_lBb^!24KQVG!_f#K&0oDyWzwI1dcioU{zIK%kO1uDyHg!1$QwjXORd z5SV!QI?{@I{|5+kic9aBmT90JHG|97bTgyXX_+A37D+gF?w6Zq!~cZbItNd3ZsrWm z95eSST5htcTqt=zCLJ>Beg{9cY-QoAUR2)qt3{1|Nu@E{hvicZye#67ph!H+ImoAo zHjy`N@Z}`~`bn|RwJ;{rKv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src/main/res/layout-land/activity_main_menu.xml index d35eb51..ef58358 100644 --- a/app/src/main/res/layout-land/activity_main_menu.xml +++ b/app/src/main/res/layout-land/activity_main_menu.xml @@ -111,7 +111,9 @@ android:clickable="true" android:numStars="4" android:rating="1" - android:stepSize="1"/> + android:stepSize="1" + android:scaleX="1.2" + android:scaleY="1.2"/>