From 8d5a59e7d51c601190d410bbef77ccad79823da7 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 26 Oct 2017 23:56:02 +0200 Subject: [PATCH] fix light theme for main page --- .../newpipe/fragments/MainFragment.java | 20 +++++++++++++++--- .../drawable-hdpi/ic_channel_black_24dp.png | Bin 0 -> 396 bytes .../drawable-hdpi/ic_whatshot_black_24dp.png | Bin 0 -> 462 bytes .../drawable-mdpi/ic_channel_black_24dp.png | Bin 0 -> 290 bytes .../drawable-mdpi/ic_whatshot_black_24dp.png | Bin 0 -> 330 bytes .../drawable-xhdpi/ic_channel_black_24dp.png | Bin 0 -> 423 bytes .../drawable-xhdpi/ic_whatshot_black_24dp.png | Bin 0 -> 601 bytes .../drawable-xxhdpi/ic_channel_black_24dp.png | Bin 0 -> 483 bytes .../ic_whatshot_black_24dp.png | Bin 0 -> 874 bytes .../ic_channel_black_24dp.png | Bin 0 -> 592 bytes .../ic_whatshot_black_24dp.png | Bin 0 -> 1134 bytes 11 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_channel_black_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_whatshot_black_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_channel_black_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_whatshot_black_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_channel_black_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_whatshot_black_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_channel_black_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_whatshot_black_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_channel_black_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_whatshot_black_24dp.png diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 190361f0e..7992f88f0 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -33,6 +33,7 @@ import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; import org.schabi.newpipe.util.NavigationHelper; +import org.schabi.newpipe.util.ThemeHelper; import java.util.concurrent.ExecutionException; @@ -85,13 +86,26 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte tabLayout.setupWithViewPager(viewPager); + if(ThemeHelper.isLightThemeSelected(getActivity())) { + tabLayout.setBackgroundColor(getResources().getColor(R.color.light_youtube_primary_color)); + } + if(PreferenceManager.getDefaultSharedPreferences(getActivity()) .getString(getString(R.string.main_page_content_key), getString(R.string.blank_page_key)) .equals(getString(R.string.subscription_page_key))) { - tabLayout.getTabAt(0).setIcon(R.drawable.ic_channel_white_24dp); + if(ThemeHelper.isLightThemeSelected(getActivity())) { + tabLayout.getTabAt(0).setIcon(R.drawable.ic_channel_black_24dp); + } else{ + tabLayout.getTabAt(0).setIcon(R.drawable.ic_channel_white_24dp); + } } else { - tabLayout.getTabAt(0).setIcon(R.drawable.ic_whatshot_white_24dp); - tabLayout.getTabAt(1).setIcon(R.drawable.ic_channel_white_24dp); + if(ThemeHelper.isLightThemeSelected(getActivity())) { + tabLayout.getTabAt(0).setIcon(R.drawable.ic_whatshot_black_24dp); + tabLayout.getTabAt(1).setIcon(R.drawable.ic_channel_black_24dp); + } else { + tabLayout.getTabAt(0).setIcon(R.drawable.ic_whatshot_white_24dp); + tabLayout.getTabAt(1).setIcon(R.drawable.ic_channel_white_24dp); + } } } diff --git a/app/src/main/res/drawable-hdpi/ic_channel_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_channel_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..ac66a3b860064d933a365f3e7454a8d83af3835d GIT binary patch literal 396 zcmV;70dxL|P) zI*6odGjzi@RZUF~tZfua)~`6_VZnNz9*^m~aF5boz$n+vDs|lbpaLUJn|9pJQAQ?E zH&ZHunWd7M99tt9>gI;4|6 zIUA9^cNAzbT19J0MJxKcgo+eFQ7RNc7~3n-Inc#UECy`?LV-hJLKT+Q9H97_`nH_h qW?ueZ?A0|L^J4rRd7e39z2h5Zpw|+kS*+s#0000 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_whatshot_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_whatshot_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..b2db5994cecf747f3dc2276b20cf40f45e3162bb GIT binary patch literal 462 zcmV;<0WtoGP)7Bih!S+{oXiJ2yCR>=~#3lD{-D!F3ZVspI^sl7^VGbJ35waS!84J-9X z2(NXS?YfxN7KQrK;zP?MPKZo{3f&T^PcGVTr(=diHlqr3_$mr(`I+9ma_tr+opwLH zkIQvI6!b+u&ZN&b<$6$X<66Oo$I-sQAWm+PF6vdLVljivd3TtPIRF3v07*qoM6N<$ Ef?reB(f|Me literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_channel_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_channel_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..984ff498ea08633941f05f9e06203a72c76ed406 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1rX+877l!}s{b%+Ad7K3vkw8&y zVGw3ym^BBap1s7=*OmPtmz1c!)I{&xK%mfOPZ!4!i_?22d2=0d5O9gNTU6~>@c2^o ziy#5}=N|-$jrTSz;C`Q=B^6 zTRfGVb*xZNG4r0wa>Z;0%jDiRcauy(-mjAyH?IqAzSTbO)Iq>Klv+FMfI-kMQ)z4*}Q$iB}166B7 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_whatshot_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_whatshot_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..31b1981f0abb4c0d99e9ab77fbd93150c9be23f0 GIT binary patch literal 330 zcmV-Q0k!^#P)SX$|J@^;bm4$-i?4V4+;hX%KMZtq$t|4>g_}D0tZ_vLYvGI2D!|A{+e!#a6*%mb ztJ*$@?3@bMgy(tyE(@8ZO3z#Q(GXm;6EeS?R9p};ziqu2?MxJRMa@Ish44tRD#zd4 zaL6+uyjFZ_oqqM$bp!Aqm!0B|keNFMfIISCiXS3-0p*9i;*H2|YvW0-8^wK*-P3l) z&s?X9vl=0MbOOL}FLP^*RTd&!JMV~7Cfxv^m)s_V`bXd4W3ABlm%rV(T zf1z1Td4z#Hz|9JgB4qXD2Mn1aN@LDFgQEOIO?*8jdBjj%UJynA4uC0rgElj#zXr(a zlT(t;=|$Gv^1lF%h?@e!Om?|{OiWGy*R00E0EZ+*#KgF|u7#y&kAyc~07t}>_w|UGn)r;nqI?%W8ShfUA6ud7 RF;f5l002ovPDHLkV1hPjsssQ4 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_whatshot_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_whatshot_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ae826708be97f118730111e3975486ba9ef25d GIT binary patch literal 601 zcmV-f0;c_mP)2x%>qIMq5TA4+W z&g1M1sx(DgWL*;|rVljXB*OwSdc`3c`K6b~D51SL$)iZ`xyv{=c!`puh?5CaXLC4c z#z)RQKxTAel|#~+<8Q-YxZ0NMC`cbGBl4W>{jPh8uMTWYaWP_oRW^pi% z%(zC9t)b10;iNnC*b@7Q)5}L>6wryI5oCtX0hVjwWaP#S;jEQsDAXPHvzkWQ*}*XH zVyj?#t&8WxTqt|PUU9}|iB zvy9Vx8r!Mk01}BLZbpvnPqB+fhxQeA@Dz`K1_GgS;1CEWu{bMu06CDVw)G{lSftW{ z^v79^Ip#{-FGWhk(WJYDq=cMhNQpU%NDLeRC~(_LV&Z7hjYVSQXwtPoV&-Vl)h{Um zXAMV~plN?N&C%cmhba3v+xSdM=^izp)I4YF>bu>hJ&n002ovPDHLkV1jgi#R>ob literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_whatshot_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_whatshot_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a14dcd695f0de6b126efd3745d359c7b78fcb771 GIT binary patch literal 874 zcmV-w1C{)VP)vfAJuvc8F$0Vcf zJu#$RM%@NsXseB~E@5bA+-OuS7n$}OuW~oZ>wY2I6DoGMx8!xNknNNX6`J91AIWQ( zNVHXjz7Y1wYpqCh&Kwn4DTK4Gmd_56>|>Saa7tY0L3y+|DUzKxTLs<`7uze3rDE8& zYS?^(;!=x^WP(Ft*v^=&K|95ej+v>xXGPtf(vW#-!q5)uFuePm6LmYRA=`v(zqw7? zN&{lV<|}QIevxR5{W)k%BP~ie$b{@$kwBjW1^wH(~dnN(G-QDC% z=y8R;C`xt4M%Qymn@F@tVIPRX{q6;AvQ7xub}H;EQJ^C>xzji)-wN5jQP|HSM}OJk z0qyG9Rn3QgLX6O#9@S!GZzrF9VP{3%cAG4p*M)3-3L6x4+GT>g)+gtFVgHF?`_(n_ zdr8PPps`fuvtBSbJc_G_o zg)JA-J+FurBGEF1O%u|+qKL1BY&GplI3SYkl;1*;XrEG6i)1IY%I7LaM4~RGOx54u ze`u>n)Mtv4-Vn)pOf<4*M6!)ao1sr6+pfNG){A7PP1AsNBAqS9OJk;Pk~}X zv)9eCX!EkuBAtU;G-z&};|J~Wu(>8`)#i3xcGq1Ay=JSx5`&_G&Re7+t3(BLs?aKf z4c< zku?3j-uqr3F9jHeVHhTT`fxK{?`FI{W3C~P3tZSzO#Z#{Ds2X4hkXuOc(xc3aasc zS5S`+02hf0Ch!5E6RWU^f2MtZ+QIvlf+_r{Lh1M?@bCG^884tm5Oqkbu9M z$f1Bl%A_j^d^PJQYZRaW1t_pD0*-Y7sYW8-77{q9+nxi00QE8}!MzZdQ3_Ci0u-PC z1t>s)RNKg0wu_C*@WplogmZubY5)1_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