From ce071e2c2ec21052c2f678e38f05d719cb83a218 Mon Sep 17 00:00:00 2001 From: Christopher Beckmann Date: Fri, 9 Oct 2020 15:46:30 +0200 Subject: [PATCH] Fixed compatibility issues in v21 with vector drawables (See https://issuetracker.google.com/issues/37074370 ) --- .../ui/MainActivity.java | 6 +- app/src/main/res/drawable-v21/ratingbar.xml | 24 +- .../drawable-xhdpi/ic_star_accent_48dp.png | Bin 2416 -> 0 bytes .../main/res/drawable/ic_circle_blue_36dp.xml | 4 +- .../main/res/drawable/ic_circle_grey_36dp.xml | 4 +- .../main/res/drawable/ic_star_black_48dp.png | Bin 0 -> 668 bytes .../main/res/drawable/ic_star_black_48dp.xml | 10 - .../main/res/drawable/ic_star_blue_36dp.png | Bin 0 -> 1776 bytes .../main/res/drawable/ic_star_blue_36dp.xml | 10 - .../main/res/drawable/ic_star_grey_36dp.png | Bin 0 -> 1776 bytes .../ic_star_grey_48dp.png | Bin .../res/drawable/ic_star_half_black_48dp.xml | 10 - app/src/main/res/drawable/ratingbar.xml | 17 +- .../res/layout-land/activity_main_menu.xml | 13 +- .../res/layout-xlarge/activity_main_menu.xml | 266 ------------------ .../main/res/layout/activity_main_menu.xml | 23 +- app/src/main/res/values-v21/styles.xml | 1 - 17 files changed, 36 insertions(+), 352 deletions(-) delete mode 100644 app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png create mode 100644 app/src/main/res/drawable/ic_star_black_48dp.png delete mode 100644 app/src/main/res/drawable/ic_star_black_48dp.xml create mode 100644 app/src/main/res/drawable/ic_star_blue_36dp.png delete mode 100644 app/src/main/res/drawable/ic_star_blue_36dp.xml create mode 100644 app/src/main/res/drawable/ic_star_grey_36dp.png rename app/src/main/res/{drawable-xhdpi => drawable}/ic_star_grey_48dp.png (100%) delete mode 100644 app/src/main/res/drawable/ic_star_half_black_48dp.xml delete 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 08b1078..4350307 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -197,11 +197,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig } else { difficultyBar.setRating(GameDifficulty.getValidDifficultyList().indexOf(lastChosenDifficulty) + 1); } - /*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/res/drawable-v21/ratingbar.xml b/app/src/main/res/drawable-v21/ratingbar.xml index fe14f96..9429b0d 100644 --- a/app/src/main/res/drawable-v21/ratingbar.xml +++ b/app/src/main/res/drawable-v21/ratingbar.xml @@ -1,34 +1,14 @@ - - - - - + android:tint="@color/middlegrey" /> + android:tint="@color/colorAccent" /> diff --git a/app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png b/app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png deleted file mode 100644 index d8bbfa1e9c962cfc5adada4321cab8b92084555e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2416 zcmdT`c~}$I9!&^>yNHO=_StDrT2!(j1fr2GK~RGTsFVtiKt>IiOiTs|izq5C#TA!V z5v_Ft6saX_vPjq$0V4vk6A&;0Vc!x0yori^e>~p*?|$FR+U2D#VRpH;swfa&hAD|7%3Wb#3j4GZ!C0Y?t=Am{=zSwTli z!7V5h24K6n!|sfo6km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*|4~AfgIw)!Gj_`K+_U4d)oD8qgZhqhA5vCIR?=VhUwAOB@b4^#znV_JfBGY=! zrWlNm_2P*cl<1b}0O=0idvla)`AV6FP`pAS*L0{lqB)l9=Em17iVe396C3`vU^qOUbeau9eQOFrLbQr)|n{u8WT?~ zJ#PJoxwP8W8YXGq)z&C>$3*DpX&Yb`2E7-WZ;2^n-V6p^gLk z>J@_K-g9VuBWsTrifG!B`@4MK^Px83C$PgJVxs-E|Ud#&*djxeu^+^fJvt172UprHt1=(JV# z+DGjlpu^KopRrO(D3@Nfx^MSjXd4j~+jNb~0t}8#55rT^m7u)mro=qP_DMr5UlN#X z=crf1S^bt&>ff5Tb^or~7{gb`V>KE_9&L|O*&BrId9zF7yURZH{F9o_+t8~WPW&hY zp54|gF|fu|utc&A-^j3-v3udW^Kh5vu}*i&^!3vnJl3DND&FhjZLI6gSoqKo-5yL0 z$8?uW+K?7nm_!+SVVD16-fV}?3wYuac)QWlPcQU(zOmkbkwrz)w|5uGwSHYzDG|%> zS^4c6oaClz%Qqa-5l4zMA0#XPxqo;QZ{^*KD6Up=KyL1~KMQA+cAC8A@!`i#S5r4M z@@vUHrqqFY%e2CDS?0u*_CmpUJbn9;(BbK^@+gTbtJ$MJ?x>%&Ri;tGjWeEg9hEmn z_WMcC#$Mn=Cf}|ilT3M5W(3dW(_uf3^ymt^QK~0-+q~PP9Z@@00%q D;wH9s diff --git a/app/src/main/res/drawable/ic_circle_blue_36dp.xml b/app/src/main/res/drawable/ic_circle_blue_36dp.xml index 5cfcc8e..735ffcd 100644 --- a/app/src/main/res/drawable/ic_circle_blue_36dp.xml +++ b/app/src/main/res/drawable/ic_circle_blue_36dp.xml @@ -1,6 +1,6 @@ L>hS~%Lf)(0@qL2a?)n8C8f?8A<)G~?|wF_Da zkx5u&xM?Rr(M8BKvKytAw|sM9a?mp$<2moS1n2i`X8Cf?4D)^;u~_Usv306Qxx;ND zWI3aZP>zBG8k$*1G0j9ok`D+%FG(U{KQdh-k?<6m?lBQijo8{m=x!pmt`o9l{6cIE zvn1S~{c%#*m2!*_CFntB^@aqY*^M|J|ORCBad48k$~%`7K2rEBLUXUO3cX6js(<0G8CYQTSx%iAW6Z_BEB}s zY3AuLqliz9a1a-^@fGo*FXV7(9d8lkUX#Uxa=H-3o>7KJDefUk-K7Kt30e?^E@7eO z1QUpd#%V@b9YcuAezFT6)bJ5;Q6JU#q!V#b2Rrmzc##mNsNgT_{S=S - - diff --git a/app/src/main/res/drawable/ic_star_blue_36dp.png b/app/src/main/res/drawable/ic_star_blue_36dp.png new file mode 100644 index 0000000000000000000000000000000000000000..0386ef9e46bbd65e7ac96c15a9ed5e76a01f341b GIT binary patch literal 1776 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL1|)l2v+e>Z$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%nF$y5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8Mv>2~2MaLaz}{y`Y4UTL84#CABECEH%ZgC_h&L>|v`+TyC*+bHiyK zRBsAyw;15ms}FRHJ}6p|q8TOxOgkVZJkbI<@MNEw2Tbclz(g%!R3#3~D`}oCjv*Dd z-pumO5O$O}Ztj~Te=V!_`mY1#SE5!dm0P3!`nCvb`~&VQO&m&GVJ-my0xew%UV{8x z;vW}8e0+4&d#&7?qs^fgo0axvT&pMS!b8NE>SQ~ZvQ|n|Vw_DL)I5sD|cDRz6nCE{~=z>?* zUlkpuXA?T&TUZZ@`TaKNZ>|&A#<9k~;(FE}g&b>%-5&Q zEWwlKtbb(c&!x@0`%=t(Ua!3xYa~sU?9{s+R^dBi$LF;r?^otb@w>j>`-am7$A$A) zs<`*4__$^7aoWq7usOVC>V>(hqqLVV-F;guC-_ugNKtRs^pB6Z^8C{xGK$1@aK<&| zCot5QPW|{;KJ1sI$C=6nk9#$qZC-2?s@8ZiK}ln|w7%-cZF&*|tbM=}u`MQ6dXfKa`=x8m^viM@O#<@(1 zwVSmTmAHSmGTOcE_7+v1;J|nBiyR}G@9w)PYk1P(YNo)p8P;6aTS5(aA8fh0A@_RA zRmrNlE-uOcb^gV!5tEOV=Iqoy^uWSNtd&`!@jeff?*Cpw-!x$O`?EA3ar@|oXNHvh``J>zZ1S?0?^=k_wPACUTR#VOkV zKvcnnANIFRWY3&ix*=-vhQxO>Q?g>cXOyi{i(IzaP3Nt8_1<`!__?_$lhfd*T=WY*n}P>NkCA?s7-dO)+(+#72R;KWg6`Z!>k1 ud!%dqGj^KzD~E^wyI2z;Q0=$&0fy~iTV6hT`qdLu2YI^sxvX - - diff --git a/app/src/main/res/drawable/ic_star_grey_36dp.png b/app/src/main/res/drawable/ic_star_grey_36dp.png new file mode 100644 index 0000000000000000000000000000000000000000..4e4e3584b12e97daba9bce24990cfaaa05c11b7b GIT binary patch literal 1776 zcmaJ?X;2eq7!E>_aw!!NY>R6siU`@w0UPy{MWfdFDPybcLNV3lb@ z9m1nfECEy|C*+bpYZGG%JAlB1$7{Sx3Axuk#^Az;9$Ua!HqMm}|1mrKsg+aMJfhY-np z>OZFBl29NB(;Q%fQg4nM$@Sh zxM4!kL@aW}rzR4FmJ5OggMnsX(lFgRkj~+7%o+@aFNyHQO&S6=`f6~GNd+N-D|M)r zKrszqR)iIpp5RkSr~jm&*1nh3;1gvc3kDitEl8(9=9DIZ63PEV)#~?XoCrfc`29~| zTxQZDU>Jg9dYzIyxC9S#C@nWghrk4;lVRBU$ts2>Vg!aKVpr=h5dD-ikz(uK@GVE`nc(}Vp2n1aAyK_H98W^mX+BF-dNh$;1I zL_4WBu1L zPi~RDW1hZmT5|Ee?GX*x>pHTjUA%?+$h(pt77Ap>?q9$EDsh&;^(Grt%)6Vkx#MjW zyDj?k3HNggU-V?A@7xN8+EFvTPG=rI4A^7?E1hO!&!HcdV{5OrJ-@b=C!fvtYRPdq ze_9qjZ)j}y7HyW8xxcqAp(gF6(!cyt{vU&lX}{mvYt=tgvO3p=mEE=pUVCX*ueGA6 zFsVJY;Pyf1nR%kuHkaa)m)%2Qjr3uw-K}tnoaT>r?=Yv3FgiW66pe8@S{BE=rxywGd(=!M8;R-?YO zxG}l<`a$f-#@i|nqAV@8`bmb~_VwKi)7noK9P^7jazEfg-Qw!{XH603^IBVa)po^; zzVkX;D)MZ2ykYj0g{?j;j^#Zouqvu~Mnz%$;~~T1Kkbh{;WZB>IOAQb_j%8%5<>2> zmb|_BkBeHJ-T|(ZrK@V6VtupT*t|9R9DNWUclSI)(Qr*Ohh25zc=VA02d4u4^?;=Q zlhTYwVW*ZE##)B(K4;O3y?dbiDod}X*7?qR>e_hIx|t`e)4v}6I4X4gqfIpD7s?;H z)ukIV%WuYFQj5&z533(MtmRs7kh*yirCw+AXO#5Z`Dkwc{iB_ffimE^W2eo1G>Zoe zFtcO(bnd~i{f3cbhciHkOMOtE>ziY%o3Yf2npf!sKJiaGTzsbYAEc#=9dq7R?J&eV z6fBu%b?i=zS5uPfd8YSKV)-bSQC{40+0#CJ^+4QlfjqyrqU&>d-7>$#nZ>)7*mi7d zhaCDYw->29w)wfHre)i@jipKPV0q3B{rWSDtNQ{1UA8;SjEGTmuDI3ZR`g4Jv7&eS zCL3Q~BwgIlUN(Of*R3h+>51L7a - - diff --git a/app/src/main/res/drawable/ratingbar.xml b/app/src/main/res/drawable/ratingbar.xml index a461706..35805cf 100644 --- a/app/src/main/res/drawable/ratingbar.xml +++ b/app/src/main/res/drawable/ratingbar.xml @@ -1,12 +1,11 @@ - - - + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_main_menu.xml b/app/src/main/res/layout-land/activity_main_menu.xml index 96f4df7..b82f328 100644 --- a/app/src/main/res/layout-land/activity_main_menu.xml +++ b/app/src/main/res/layout-land/activity_main_menu.xml @@ -29,7 +29,6 @@ - + app:layout_constraintTop_toTopOf="@+id/difficultyBar" + app:layout_constraintVertical_bias="0.5" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -