Fix Dark elements in Light Theme
This commit is contained in:
parent
1d51002173
commit
fd14c8cdce
288 changed files with 327 additions and 560 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package org.schabi.newpipe.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -30,7 +29,6 @@ import org.schabi.newpipe.settings.tabs.Tab;
|
|||
import org.schabi.newpipe.settings.tabs.TabsManager;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.ServiceHelper;
|
||||
import org.schabi.newpipe.util.ThemeHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -87,8 +85,6 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
|||
|
||||
binding = FragmentMainBinding.bind(rootView);
|
||||
|
||||
binding.mainTabLayout.setTabIconTint(ColorStateList.valueOf(
|
||||
ThemeHelper.resolveColorFromAttr(requireContext(), R.attr.colorAccent)));
|
||||
binding.mainTabLayout.setupWithViewPager(binding.pager);
|
||||
binding.mainTabLayout.addOnTabSelectedListener(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -923,21 +923,21 @@ public final class VideoDetailFragment
|
|||
if (shouldShowComments()) {
|
||||
pageAdapter.addFragment(
|
||||
CommentsFragment.getInstance(serviceId, url, title), COMMENTS_TAB_TAG);
|
||||
tabIcons.add(R.drawable.ic_comment_white_24dp);
|
||||
tabIcons.add(R.drawable.ic_comment);
|
||||
tabContentDescriptions.add(R.string.comments_tab_description);
|
||||
}
|
||||
|
||||
if (showRelatedStreams && binding.relatedStreamsLayout == null) {
|
||||
// temp empty fragment. will be updated in handleResult
|
||||
pageAdapter.addFragment(new EmptyFragment(false), RELATED_TAB_TAG);
|
||||
tabIcons.add(R.drawable.ic_art_track_white_24dp);
|
||||
tabIcons.add(R.drawable.ic_art_track);
|
||||
tabContentDescriptions.add(R.string.related_streams_tab_description);
|
||||
}
|
||||
|
||||
if (showDescription) {
|
||||
// temp empty fragment. will be updated in handleResult
|
||||
pageAdapter.addFragment(new EmptyFragment(false), DESCRIPTION_TAB_TAG);
|
||||
tabIcons.add(R.drawable.ic_description_white_24dp);
|
||||
tabIcons.add(R.drawable.ic_description);
|
||||
tabContentDescriptions.add(R.string.description_tab_description);
|
||||
}
|
||||
|
||||
|
|
@ -2274,11 +2274,10 @@ public final class VideoDetailFragment
|
|||
}
|
||||
|
||||
private void setOverlayPlayPauseImage(final boolean playerIsPlaying) {
|
||||
final int attr = playerIsPlaying
|
||||
? R.attr.ic_pause
|
||||
: R.attr.ic_play_arrow;
|
||||
binding.overlayPlayPauseButton.setImageResource(
|
||||
ThemeHelper.resolveResourceIdFromAttr(activity, attr));
|
||||
final int drawable = playerIsPlaying
|
||||
? R.drawable.ic_pause
|
||||
: R.drawable.ic_play_arrow;
|
||||
binding.overlayPlayPauseButton.setImageResource(drawable);
|
||||
}
|
||||
|
||||
private void setOverlayLook(final AppBarLayout appBar,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ import io.reactivex.rxjava3.disposables.Disposable;
|
|||
|
||||
import static org.schabi.newpipe.ktx.ViewUtils.animate;
|
||||
import static org.schabi.newpipe.ktx.ViewUtils.animateHideRecyclerViewAllowingScrolling;
|
||||
import static org.schabi.newpipe.util.ThemeHelper.resolveResourceIdFromAttr;
|
||||
|
||||
public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
||||
private CompositeDisposable disposables;
|
||||
|
|
@ -307,7 +306,7 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
|||
getResources().getColor(R.color.transparent_background_color));
|
||||
headerBinding.uploaderAvatarView.setImageDrawable(
|
||||
AppCompatResources.getDrawable(requireContext(),
|
||||
resolveResourceIdFromAttr(requireContext(), R.attr.ic_radio))
|
||||
R.drawable.ic_radio)
|
||||
);
|
||||
} else {
|
||||
IMAGE_LOADER.displayImage(avatarUrl, headerBinding.uploaderAvatarView,
|
||||
|
|
@ -459,13 +458,13 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
|
|||
return;
|
||||
}
|
||||
|
||||
final int iconAttr = playlistEntity == null
|
||||
? R.attr.ic_playlist_add : R.attr.ic_playlist_check;
|
||||
final int drawable = playlistEntity == null
|
||||
? R.drawable.ic_playlist_add : R.drawable.ic_playlist_add_check;
|
||||
|
||||
final int titleRes = playlistEntity == null
|
||||
? R.string.bookmark_playlist : R.string.unbookmark_playlist;
|
||||
|
||||
playlistBookmarkButton.setIcon(resolveResourceIdFromAttr(activity, iconAttr));
|
||||
playlistBookmarkButton.setIcon(drawable);
|
||||
playlistBookmarkButton.setTitle(titleRes);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ public class SuggestionListAdapter
|
|||
queryView = rootView.findViewById(R.id.suggestion_search);
|
||||
insertView = rootView.findViewById(R.id.suggestion_insert);
|
||||
|
||||
historyResId = resolveResourceIdFromAttr(rootView.getContext(), R.attr.ic_history);
|
||||
searchResId = resolveResourceIdFromAttr(rootView.getContext(), R.attr.ic_search);
|
||||
historyResId = R.drawable.ic_history;
|
||||
searchResId = R.drawable.ic_search;
|
||||
}
|
||||
|
||||
private static int resolveResourceIdFromAttr(final Context context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue