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 000000000..ac66a3b86 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_channel_black_24dp.png differ 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 000000000..b2db5994c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_whatshot_black_24dp.png differ 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 000000000..984ff498e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_channel_black_24dp.png differ 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 000000000..31b1981f0 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_whatshot_black_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_channel_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_channel_black_24dp.png new file mode 100644 index 000000000..0851f1738 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_channel_black_24dp.png differ 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 000000000..e9ae82670 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_whatshot_black_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_channel_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_channel_black_24dp.png new file mode 100644 index 000000000..4861728c4 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_channel_black_24dp.png differ 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 000000000..a14dcd695 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_whatshot_black_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_channel_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_channel_black_24dp.png new file mode 100644 index 000000000..2ff64b449 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_channel_black_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_whatshot_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_whatshot_black_24dp.png new file mode 100644 index 000000000..8f03a95c7 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_whatshot_black_24dp.png differ