fix light theme for main page
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_channel_black_24dp.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
app/src/main/res/drawable-hdpi/ic_whatshot_black_24dp.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
app/src/main/res/drawable-mdpi/ic_channel_black_24dp.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
app/src/main/res/drawable-mdpi/ic_whatshot_black_24dp.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
app/src/main/res/drawable-xhdpi/ic_channel_black_24dp.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
app/src/main/res/drawable-xhdpi/ic_whatshot_black_24dp.png
Normal file
After Width: | Height: | Size: 601 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_channel_black_24dp.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_whatshot_black_24dp.png
Normal file
After Width: | Height: | Size: 874 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_channel_black_24dp.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_whatshot_black_24dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |