diff --git a/app/src/debug/res/xml/main_settings.xml b/app/src/debug/res/xml/main_settings.xml index dfb8ffa34..d482d033c 100644 --- a/app/src/debug/res/xml/main_settings.xml +++ b/app/src/debug/res/xml/main_settings.xml @@ -6,50 +6,50 @@ diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 1b8f3190e..90db7bead 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -133,6 +133,8 @@ public class MainActivity extends AppCompatActivity { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { TLSSocketFactoryCompat.setAsDefault(); } + + ThemeHelper.setDayNightMode(this); ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); assureCorrectAppLanguage(this); @@ -180,27 +182,27 @@ public class MainActivity extends AppCompatActivity { drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_channel)); + .setIcon(R.drawable.ic_tv); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_rss)); + .setIcon(R.drawable.ic_rss_feed); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_bookmark)); + .setIcon(R.drawable.ic_bookmark); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_DOWNLOADS, ORDER, R.string.downloads) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_file_download)); + .setIcon(R.drawable.ic_file_download); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_HISTORY, ORDER, R.string.action_history) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_history)); + .setIcon(R.drawable.ic_history); //Settings and About drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_options_about_group, ITEM_ID_SETTINGS, ORDER, R.string.settings) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_settings)); + .setIcon(R.drawable.ic_settings); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_info_outline)); + .setIcon(R.drawable.ic_info_outline); toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(), toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close); @@ -346,7 +348,7 @@ public class MainActivity extends AppCompatActivity { } private void showServices() { - drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_up_white_24dp); + drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_up); for (final StreamingService s : NewPipe.getServices()) { final String title = s.getServiceInfo().getName() @@ -412,7 +414,7 @@ public class MainActivity extends AppCompatActivity { } private void showTabs() throws ExtractionException { - drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_down_white_24dp); + drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_down); //Tabs final int currentServiceId = ServiceHelper.getSelectedServiceId(this); @@ -430,27 +432,27 @@ public class MainActivity extends AppCompatActivity { drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_channel)); + .setIcon(R.drawable.ic_tv); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_rss)); + .setIcon(R.drawable.ic_rss_feed); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_bookmark)); + .setIcon(R.drawable.ic_bookmark); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_DOWNLOADS, ORDER, R.string.downloads) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_file_download)); + .setIcon(R.drawable.ic_file_download); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_tabs_group, ITEM_ID_HISTORY, ORDER, R.string.action_history) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_history)); + .setIcon(R.drawable.ic_history); //Settings and About drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_options_about_group, ITEM_ID_SETTINGS, ORDER, R.string.settings) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_settings)); + .setIcon(R.drawable.ic_settings); drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_info_outline)); + .setIcon(R.drawable.ic_info_outline); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index 179fab8dc..13efcb58d 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -91,7 +91,6 @@ import io.reactivex.rxjava3.schedulers.Schedulers; import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO; import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO; -import static org.schabi.newpipe.util.ThemeHelper.resolveResourceIdFromAttr; /** * Get the url from the intent and open it in the chosen preferred player. @@ -231,7 +230,7 @@ public class RouterActivity extends AppCompatActivity { new AlertDialog.Builder(context) .setTitle(R.string.unsupported_url) .setMessage(R.string.unsupported_url_dialog_message) - .setIcon(ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_share)) + .setIcon(R.drawable.ic_share) .setPositiveButton(R.string.open_in_browser, (dialog, which) -> ShareUtils.openUrlInBrowser(this, url)) .setNegativeButton(R.string.share, @@ -427,16 +426,16 @@ public class RouterActivity extends AppCompatActivity { final AdapterChoiceItem videoPlayer = new AdapterChoiceItem( getString(R.string.video_player_key), getString(R.string.video_player), - resolveResourceIdFromAttr(context, R.attr.ic_play_arrow)); + R.drawable.ic_play_arrow); final AdapterChoiceItem showInfo = new AdapterChoiceItem( getString(R.string.show_info_key), getString(R.string.show_info), - resolveResourceIdFromAttr(context, R.attr.ic_info_outline)); + R.drawable.ic_info_outline); final AdapterChoiceItem popupPlayer = new AdapterChoiceItem( getString(R.string.popup_player_key), getString(R.string.popup_player), - resolveResourceIdFromAttr(context, R.attr.ic_popup)); + R.drawable.ic_picture_in_picture); final AdapterChoiceItem backgroundPlayer = new AdapterChoiceItem( getString(R.string.background_player_key), getString(R.string.background_player), - resolveResourceIdFromAttr(context, R.attr.ic_headset)); + R.drawable.ic_headset); if (linkType == LinkType.STREAM) { if (isExtVideoEnabled) { @@ -481,7 +480,7 @@ public class RouterActivity extends AppCompatActivity { returnList.add(new AdapterChoiceItem(getString(R.string.download_key), getString(R.string.download), - resolveResourceIdFromAttr(context, R.attr.ic_file_download))); + R.drawable.ic_file_download)); return returnList; } diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 484a46497..4d3726c38 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -394,8 +394,7 @@ public class DownloadDialog extends DialogFragment } toolbar.setTitle(R.string.download_dialog_title); - toolbar.setNavigationIcon( - ThemeHelper.resolveResourceIdFromAttr(requireContext(), R.attr.ic_arrow_back)); + toolbar.setNavigationIcon(R.drawable.ic_arrow_back); toolbar.inflateMenu(R.menu.dialog_url); toolbar.setNavigationOnClickListener(v -> requireDialog().dismiss()); toolbar.setNavigationContentDescription(R.string.cancel); diff --git a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java index c39d616e6..4efb7cf93 100644 --- a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java @@ -137,6 +137,8 @@ public class ErrorActivity extends AppCompatActivity { protected void onCreate(final Bundle savedInstanceState) { assureCorrectAppLanguage(this); super.onCreate(savedInstanceState); + + ThemeHelper.setDayNightMode(this); ThemeHelper.setTheme(this); activityErrorBinding = ActivityErrorBinding.inflate(getLayoutInflater()); 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 5fb68ba30..88d7e757e 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -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,10 +85,10 @@ 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); + binding.mainTabLayout.setTabRippleColor(binding.mainTabLayout.getTabRippleColor() + .withAlpha(32)); setupTabs(); } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index a6c222637..71739ba3d 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -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 (showRelatedItems && binding.relatedItemsLayout == 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_items_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); } @@ -2280,11 +2280,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, diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index e20df67a1..a729b7cc9 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -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 { private CompositeDisposable disposables; @@ -307,7 +306,7 @@ public class PlaylistFragment extends BaseListInfoFragment { 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, @@ -461,13 +460,13 @@ public class PlaylistFragment extends BaseListInfoFragment { 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); } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 76d9d6e38..b52aaf2f8 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -487,6 +487,9 @@ public class SearchFragment extends BaseListFragment() { feedGroupsCarousel = FeedGroupCarouselItem(requireContext(), carouselAdapter) feedGroupsSortMenuItem = HeaderWithMenuItem( getString(R.string.feed_groups_header_title), - ThemeHelper.resolveResourceIdFromAttr(requireContext(), R.attr.ic_sort), + R.drawable.ic_sort, menuItemOnClickListener = ::openReorderDialog ) add(Section(feedGroupsSortMenuItem, listOf(feedGroupsCarousel))) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt index 5bd13356d..2918bcd66 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt @@ -1,6 +1,7 @@ package org.schabi.newpipe.local.subscription.dialog import android.app.Dialog +import android.content.res.ColorStateList import android.os.Bundle import android.os.Parcelable import android.view.LayoutInflater @@ -12,6 +13,7 @@ import androidx.core.content.getSystemService import androidx.core.os.bundleOf import androidx.core.view.isGone import androidx.core.view.isVisible +import androidx.core.widget.ImageViewCompat import androidx.core.widget.doOnTextChanged import androidx.fragment.app.DialogFragment import androidx.lifecycle.Observer @@ -123,6 +125,14 @@ class FeedGroupDialog : DialogFragment(), BackPressable { _feedGroupCreateBinding = DialogFeedGroupCreateBinding.bind(view) _searchLayoutBinding = feedGroupCreateBinding.subscriptionsHeaderSearchContainer + if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) { + // KitKat doesn't apply container's theme to content + val contrastColor = ColorStateList.valueOf(resources.getColor(R.color.contrastColor)) + searchLayoutBinding.toolbarSearchEditText.setTextColor(contrastColor) + searchLayoutBinding.toolbarSearchEditText.setHintTextColor(contrastColor.withAlpha(128)) + ImageViewCompat.setImageTintList(searchLayoutBinding.toolbarSearchClearIcon, contrastColor) + } + viewModel = ViewModelProvider( this, FeedGroupDialogViewModel.Factory( @@ -306,7 +316,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable { groupSortOrder = feedGroupEntity?.sortOrder ?: -1 val feedGroupIcon = if (selectedIcon == null) icon else selectedIcon!! - feedGroupCreateBinding.iconPreview.setImageResource(feedGroupIcon.getDrawableRes(requireContext())) + feedGroupCreateBinding.iconPreview.setImageResource(feedGroupIcon.getDrawableRes()) if (feedGroupCreateBinding.groupNameInput.text.isNullOrBlank()) { feedGroupCreateBinding.groupNameInput.setText(name) @@ -404,7 +414,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable { if (groupId == NO_GROUP_SELECTED) { val icon = selectedIcon ?: FeedGroupIcon.ALL - feedGroupCreateBinding.iconPreview.setImageResource(icon.getDrawableRes(requireContext())) + feedGroupCreateBinding.iconPreview.setImageResource(icon.getDrawableRes()) } } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt index a9731df8a..7b78b3d95 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt @@ -25,7 +25,7 @@ data class FeedGroupCardItem( override fun bind(viewBinding: FeedGroupCardItemBinding, position: Int) { viewBinding.title.text = name - viewBinding.icon.setImageResource(icon.getDrawableRes(viewBinding.root.context)) + viewBinding.icon.setImageResource(icon.getDrawableRes()) } override fun initializeViewBinding(view: View) = FeedGroupCardItemBinding.bind(view) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt index 74e481c4f..9a33de54d 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt @@ -32,7 +32,7 @@ data class FeedGroupReorderItem( override fun bind(viewBinding: FeedGroupReorderItemBinding, position: Int) { viewBinding.groupName.text = name - viewBinding.groupIcon.setImageResource(icon.getDrawableRes(viewBinding.root.context)) + viewBinding.groupIcon.setImageResource(icon.getDrawableRes()) } override fun bind(viewHolder: GroupieViewHolder, position: Int, payloads: MutableList) { diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt index afca7064f..aacfc77ad 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt @@ -86,7 +86,7 @@ class FeedImportExportItem( private fun setupImportFromItems(listHolder: ViewGroup) { val previousBackupItem = addItemView( listHolder.context.getString(R.string.previous_export), - ThemeHelper.resolveResourceIdFromAttr(listHolder.context, R.attr.ic_backup), listHolder + R.drawable.ic_backup, listHolder ) previousBackupItem.setOnClickListener { onImportPreviousSelected() } @@ -115,8 +115,7 @@ class FeedImportExportItem( private fun setupExportToItems(listHolder: ViewGroup) { val previousBackupItem = addItemView( listHolder.context.getString(R.string.file), - ThemeHelper.resolveResourceIdFromAttr(listHolder.context, R.attr.ic_save), - listHolder + R.drawable.ic_save, listHolder ) previousBackupItem.setOnClickListener { onExportSelected() } } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt index 11fc4833a..1b55d2e85 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt @@ -13,7 +13,7 @@ class PickerIconItem( val icon: FeedGroupIcon ) : BindableItem() { @DrawableRes - val iconRes: Int = icon.getDrawableRes(context) + val iconRes: Int = icon.getDrawableRes() override fun getLayout(): Int = R.layout.picker_icon_item diff --git a/app/src/main/java/org/schabi/newpipe/player/NotificationConstants.java b/app/src/main/java/org/schabi/newpipe/player/NotificationConstants.java index cf58c8f76..6c9858d1b 100644 --- a/app/src/main/java/org/schabi/newpipe/player/NotificationConstants.java +++ b/app/src/main/java/org/schabi/newpipe/player/NotificationConstants.java @@ -50,11 +50,11 @@ public final class NotificationConstants { R.drawable.exo_icon_fastforward, R.drawable.exo_icon_previous, R.drawable.exo_icon_next, - R.drawable.ic_pause_white_24dp, - R.drawable.ic_hourglass_top_white_24dp, + R.drawable.ic_pause, + R.drawable.ic_hourglass_top, R.drawable.exo_icon_repeat_all, R.drawable.exo_icon_shuffle_on, - R.drawable.ic_close_white_24dp, + R.drawable.ic_close, }; diff --git a/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java b/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java index 43c1b4405..948343be2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java +++ b/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java @@ -273,14 +273,14 @@ public final class NotificationUtil { || player.getCurrentState() == Player.STATE_BLOCKED || player.getCurrentState() == Player.STATE_BUFFERING) { // null intent -> show hourglass icon that does nothing when clicked - return new NotificationCompat.Action(R.drawable.ic_hourglass_top_white_24dp_png, + return new NotificationCompat.Action(R.drawable.ic_hourglass_top, player.getContext().getString(R.string.notification_action_buffering), null); } case NotificationConstants.PLAY_PAUSE: if (player.getCurrentState() == Player.STATE_COMPLETED) { - return getAction(player, R.drawable.ic_replay_white_24dp_png, + return getAction(player, R.drawable.ic_replay, R.string.exo_controls_pause_description, ACTION_PLAY_PAUSE); } else if (player.isPlaying() || player.getCurrentState() == Player.STATE_PREFLIGHT @@ -315,7 +315,7 @@ public final class NotificationUtil { } case NotificationConstants.CLOSE: - return getAction(player, R.drawable.ic_close_white_24dp_png, + return getAction(player, R.drawable.ic_close, R.string.close, ACTION_CLOSE); case NotificationConstants.NOTHING: diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java index d757a9268..08a2762a9 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java @@ -589,15 +589,15 @@ public final class PlayQueueActivity extends AppCompatActivity switch (state) { case Player.STATE_PAUSED: queueControlBinding.controlPlayPause - .setImageResource(R.drawable.ic_play_arrow_white_24dp); + .setImageResource(R.drawable.ic_play_arrow); break; case Player.STATE_PLAYING: queueControlBinding.controlPlayPause - .setImageResource(R.drawable.ic_pause_white_24dp); + .setImageResource(R.drawable.ic_pause); break; case Player.STATE_COMPLETED: queueControlBinding.controlPlayPause - .setImageResource(R.drawable.ic_replay_white_24dp); + .setImageResource(R.drawable.ic_replay); break; default: break; @@ -670,8 +670,7 @@ public final class PlayQueueActivity extends AppCompatActivity //2) Icon change accordingly to current App Theme // using rootView.getContext() because getApplicationContext() didn't work final Context context = queueControlBinding.getRoot().getContext(); - item.setIcon(ThemeHelper.resolveResourceIdFromAttr(context, - player.isMuted() ? R.attr.ic_volume_off : R.attr.ic_volume_up)); + item.setIcon(player.isMuted() ? R.drawable.ic_volume_off : R.drawable.ic_volume_up); } } } diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index faaccc9fe..37a061edc 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -26,6 +26,7 @@ import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; +import android.view.ContextThemeWrapper; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -51,6 +52,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatImageButton; import androidx.core.content.ContextCompat; import androidx.core.view.DisplayCutoutCompat; import androidx.core.view.ViewCompat; @@ -447,9 +449,12 @@ public final class Player implements binding.playbackSeekBar.getProgressDrawable() .setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.MULTIPLY)); - qualityPopupMenu = new PopupMenu(context, binding.qualityTextView); + final ContextThemeWrapper themeWrapper = new ContextThemeWrapper(getContext(), + R.style.DarkPopupMenu); + + qualityPopupMenu = new PopupMenu(themeWrapper, binding.qualityTextView); playbackSpeedPopupMenu = new PopupMenu(context, binding.playbackSpeed); - captionPopupMenu = new PopupMenu(context, binding.captionTextView); + captionPopupMenu = new PopupMenu(themeWrapper, binding.captionTextView); binding.progressBarLoadingPanel.getIndeterminateDrawable() .setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY)); @@ -956,7 +961,7 @@ public final class Player implements = LinearLayout.LayoutParams.MATCH_PARENT; binding.secondaryControls.setVisibility(View.INVISIBLE); binding.moreOptionsButton.setImageDrawable(AppCompatResources.getDrawable(context, - R.drawable.ic_expand_more_white_24dp)); + R.drawable.ic_expand_more)); binding.share.setVisibility(View.VISIBLE); binding.openInBrowser.setVisibility(View.VISIBLE); binding.switchMute.setVisibility(View.VISIBLE); @@ -2020,7 +2025,7 @@ public final class Player implements animate(binding.loadingPanel, true, 0); animate(binding.surfaceForeground, true, 100); - binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp); + binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow); animatePlayButtons(false, 100); binding.getRoot().setKeepScreenOn(false); @@ -2049,7 +2054,7 @@ public final class Player implements animate(binding.playPauseButton, false, 80, AnimationType.SCALE_AND_ALPHA, 0, () -> { - binding.playPauseButton.setImageResource(R.drawable.ic_pause_white_24dp); + binding.playPauseButton.setImageResource(R.drawable.ic_pause); animatePlayButtons(true, 200); if (!isQueueVisible) { binding.playPauseButton.requestFocus(); @@ -2090,7 +2095,7 @@ public final class Player implements animate(binding.playPauseButton, false, 80, AnimationType.SCALE_AND_ALPHA, 0, () -> { - binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp); + binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow); animatePlayButtons(true, 200); if (!isQueueVisible) { binding.playPauseButton.requestFocus(); @@ -2129,7 +2134,7 @@ public final class Player implements animate(binding.playPauseButton, false, 0, AnimationType.SCALE_AND_ALPHA, 0, () -> { - binding.playPauseButton.setImageResource(R.drawable.ic_replay_white_24dp); + binding.playPauseButton.setImageResource(R.drawable.ic_replay); animatePlayButtons(true, DEFAULT_CONTROLS_DURATION); }); @@ -2221,7 +2226,7 @@ public final class Player implements Log.d(TAG, "ExoPlayer - onRepeatModeChanged() called with: " + "repeatMode = [" + repeatMode + "]"); } - setRepeatModeButton(binding.repeatButton, repeatMode); + setRepeatModeButton(((AppCompatImageButton) binding.repeatButton), repeatMode); onShuffleOrRepeatModeChanged(); } @@ -2249,7 +2254,7 @@ public final class Player implements NotificationUtil.getInstance().createNotificationIfNeededAndUpdate(this, false); } - private void setRepeatModeButton(final ImageButton imageButton, final int repeatMode) { + private void setRepeatModeButton(final AppCompatImageButton imageButton, final int repeatMode) { switch (repeatMode) { case REPEAT_MODE_OFF: imageButton.setImageResource(R.drawable.exo_controls_repeat_off); @@ -2290,7 +2295,7 @@ public final class Player implements private void setMuteButton(final ImageButton button, final boolean isMuted) { button.setImageDrawable(AppCompatResources.getDrawable(context, isMuted - ? R.drawable.ic_volume_off_white_24dp : R.drawable.ic_volume_up_white_24dp)); + ? R.drawable.ic_volume_off : R.drawable.ic_volume_up)); } //endregion @@ -2728,7 +2733,7 @@ public final class Player implements } seekBy(retrieveSeekDurationFromPreferences(this)); triggerProgressUpdate(); - showAndAnimateControl(R.drawable.ic_fast_forward_white_24dp, true); + showAndAnimateControl(R.drawable.ic_fast_forward, true); } public void fastRewind() { @@ -2737,7 +2742,7 @@ public final class Player implements } seekBy(-retrieveSeekDurationFromPreferences(this)); triggerProgressUpdate(); - showAndAnimateControl(R.drawable.ic_fast_rewind_white_24dp, true); + showAndAnimateControl(R.drawable.ic_fast_rewind, true); } //endregion @@ -3685,8 +3690,8 @@ public final class Player implements || DeviceUtils.isTablet(context)) ? View.VISIBLE : View.GONE); binding.screenRotationButton.setImageDrawable(AppCompatResources.getDrawable(context, - isFullscreen ? R.drawable.ic_fullscreen_exit_white_24dp - : R.drawable.ic_fullscreen_white_24dp)); + isFullscreen ? R.drawable.ic_fullscreen_exit + : R.drawable.ic_fullscreen)); } private void setResizeMode(@AspectRatioFrameLayout.ResizeMode final int resizeMode) { diff --git a/app/src/main/java/org/schabi/newpipe/player/event/PlayerGestureListener.java b/app/src/main/java/org/schabi/newpipe/player/event/PlayerGestureListener.java index a0b2e7eba..998324c9c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/event/PlayerGestureListener.java +++ b/app/src/main/java/org/schabi/newpipe/player/event/PlayerGestureListener.java @@ -147,10 +147,10 @@ public class PlayerGestureListener player.getVolumeImageView().setImageDrawable( AppCompatResources.getDrawable(service, currentProgressPercent <= 0 - ? R.drawable.ic_volume_off_white_24dp - : currentProgressPercent < 0.25 ? R.drawable.ic_volume_mute_white_24dp - : currentProgressPercent < 0.75 ? R.drawable.ic_volume_down_white_24dp - : R.drawable.ic_volume_up_white_24dp) + ? R.drawable.ic_volume_off + : currentProgressPercent < 0.25 ? R.drawable.ic_volume_mute + : currentProgressPercent < 0.75 ? R.drawable.ic_volume_down + : R.drawable.ic_volume_up) ); if (player.getVolumeRelativeLayout().getVisibility() != View.VISIBLE) { @@ -189,10 +189,10 @@ public class PlayerGestureListener player.getBrightnessImageView().setImageDrawable( AppCompatResources.getDrawable(service, currentProgressPercent < 0.25 - ? R.drawable.ic_brightness_low_white_24dp + ? R.drawable.ic_brightness_low : currentProgressPercent < 0.75 - ? R.drawable.ic_brightness_medium_white_24dp - : R.drawable.ic_brightness_high_white_24dp) + ? R.drawable.ic_brightness_medium + : R.drawable.ic_brightness_high) ); if (player.getBrightnessRelativeLayout().getVisibility() != View.VISIBLE) { diff --git a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java index fe89f62a0..1e1b03b4f 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java @@ -12,6 +12,7 @@ import androidx.preference.Preference; import org.schabi.newpipe.R; import org.schabi.newpipe.util.Constants; +import org.schabi.newpipe.util.ThemeHelper; public class AppearanceSettingsFragment extends BasePreferenceFragment { private static final boolean CAPTIONING_SETTINGS_ACCESSIBLE = @@ -83,6 +84,8 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment { defaultPreferences.edit().putBoolean(Constants.KEY_THEME_CHANGE, true).apply(); defaultPreferences.edit().putString(themeKey, newValue.toString()).apply(); + ThemeHelper.setDayNightMode(getContext(), newValue.toString()); + if (!newValue.equals(beginningThemeKey) && getActivity() != null) { // if it's not the current theme ActivityCompat.recreate(getActivity()); diff --git a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java index bd3cbf79d..550e9be3f 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java @@ -145,10 +145,8 @@ public class PeertubeInstanceListFragment extends Fragment { final MenuItem restoreItem = menu .add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE, R.string.restore_defaults); restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); - - final int restoreIcon = ThemeHelper - .resolveResourceIdFromAttr(requireContext(), R.attr.ic_restore_defaults); - restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(), restoreIcon)); + restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(), + R.drawable.ic_settings_backup_restore)); } @Override @@ -188,7 +186,7 @@ public class PeertubeInstanceListFragment extends Fragment { } private void restoreDefaults() { - new AlertDialog.Builder(requireContext(), ThemeHelper.getDialogTheme(requireContext())) + new AlertDialog.Builder(requireContext()) .setTitle(R.string.restore_defaults) .setMessage(R.string.restore_defaults_confirmation) .setNegativeButton(R.string.cancel, null) diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java index 52e50fbba..125b455f4 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java @@ -14,7 +14,6 @@ import androidx.annotation.NonNull; import androidx.appcompat.widget.AppCompatImageView; import org.schabi.newpipe.R; -import org.schabi.newpipe.util.ThemeHelper; public final class AddTabDialog { private final AlertDialog dialog; @@ -60,7 +59,7 @@ public final class AddTabDialog { private DialogListAdapter(final Context context, final ChooseTabListItem[] items) { this.inflater = LayoutInflater.from(context); this.items = items; - this.fallbackIcon = ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_kiosk_hot); + this.fallbackIcon = R.drawable.ic_whatshot; } @Override diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java index 572741d03..9c1a9bdd7 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java @@ -112,10 +112,8 @@ public class ChooseTabsFragment extends Fragment { final MenuItem restoreItem = menu.add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE, R.string.restore_defaults); restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); - - final int restoreIcon = ThemeHelper.resolveResourceIdFromAttr(requireContext(), - R.attr.ic_restore_defaults); - restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(), restoreIcon)); + restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(), + R.drawable.ic_settings_backup_restore)); } @Override @@ -142,7 +140,7 @@ public class ChooseTabsFragment extends Fragment { } private void restoreDefaults() { - new AlertDialog.Builder(requireContext(), ThemeHelper.getDialogTheme(requireContext())) + new AlertDialog.Builder(requireContext()) .setTitle(R.string.restore_defaults) .setMessage(R.string.restore_defaults_confirmation) .setNegativeButton(R.string.cancel, null) @@ -241,7 +239,7 @@ public class ChooseTabsFragment extends Fragment { case KIOSK: returnList.add(new ChooseTabListItem(tab.getTabId(), getString(R.string.kiosk_page_summary), - ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_kiosk_hot))); + R.drawable.ic_whatshot)); break; case CHANNEL: returnList.add(new ChooseTabListItem(tab.getTabId(), @@ -252,8 +250,7 @@ public class ChooseTabsFragment extends Fragment { if (!tabList.contains(tab)) { returnList.add(new ChooseTabListItem(tab.getTabId(), getString(R.string.default_kiosk_page_summary), - ThemeHelper.resolveResourceIdFromAttr(context, - R.attr.ic_kiosk_hot))); + R.drawable.ic_whatshot)); } break; case PLAYLIST: diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java index 0ffda2261..b289009ce 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java @@ -30,7 +30,6 @@ import org.schabi.newpipe.local.playlist.LocalPlaylistFragment; import org.schabi.newpipe.local.subscription.SubscriptionFragment; import org.schabi.newpipe.util.KioskTranslator; import org.schabi.newpipe.util.ServiceHelper; -import org.schabi.newpipe.util.ThemeHelper; import java.util.Objects; @@ -188,7 +187,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_blank_page); + return R.drawable.ic_crop_portrait; } @Override @@ -213,7 +212,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_channel); + return R.drawable.ic_tv; } @Override @@ -239,7 +238,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_rss); + return R.drawable.ic_rss_feed; } @Override @@ -264,7 +263,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_bookmark); + return R.drawable.ic_bookmark; } @Override @@ -289,7 +288,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_history); + return R.drawable.ic_history; } @Override @@ -409,7 +408,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_channel); + return R.drawable.ic_tv; } @Override @@ -541,7 +540,7 @@ public abstract class Tab { @DrawableRes @Override public int getTabIconRes(final Context context) { - return ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_bookmark); + return R.drawable.ic_bookmark; } @Override diff --git a/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java b/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java index 2f0b3e132..f77aa0fda 100644 --- a/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java +++ b/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java @@ -63,20 +63,20 @@ public final class KioskTranslator { case "Top 50": case "New & hot": case "conferences": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_kiosk_hot); + return R.drawable.ic_whatshot; case "Local": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_kiosk_local); + return R.drawable.ic_home; case "Recently added": case "recent": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_kiosk_recent); + return R.drawable.ic_add_circle_outline; case "Most liked": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_thumb_up); + return R.drawable.ic_thumb_up; case "live": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_live_tv); + return R.drawable.ic_live_tv; case "Featured": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_stars); + return R.drawable.ic_stars; case "Radio": - return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_radio); + return R.drawable.ic_radio; default: return 0; } diff --git a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java index dcfb7ed19..907bcf0ba 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java @@ -23,7 +23,6 @@ import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; -import android.content.res.TypedArray; import android.util.TypedValue; import androidx.annotation.AttrRes; @@ -31,6 +30,7 @@ import androidx.annotation.Nullable; import androidx.annotation.StyleRes; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; import androidx.core.content.ContextCompat; import androidx.preference.PreferenceManager; @@ -47,6 +47,9 @@ public final class ThemeHelper { * Apply the selected theme (on NewPipe settings) in the context * with the default style (see {@link #setTheme(Context, int)}). * + * ThemeHelper.setDayNightMode should be called before + * the applying theme for the first time in session + * * @param context context that the theme will be applied */ public static void setTheme(final Context context) { @@ -57,6 +60,9 @@ public final class ThemeHelper { * Apply the selected theme (on NewPipe settings) in the context, * themed according with the styles defined for the service . * + * ThemeHelper.setDayNightMode should be called before + * the applying theme for the first time in session + * * @param context context that the theme will be applied * @param serviceId the theme will be styled to the service with this id, * pass -1 to get the default style @@ -120,6 +126,7 @@ public final class ThemeHelper { final String selectedThemeKey = getSelectedThemeKey(context); + int baseTheme = R.style.DarkTheme; // default to dark theme if (selectedThemeKey.equals(lightThemeKey)) { baseTheme = R.style.LightTheme; @@ -202,20 +209,6 @@ public final class ThemeHelper { } } - /** - * Get a resource id from a resource styled according to the context's theme. - * - * @param context Android app context - * @param attr attribute reference of the resource - * @return resource ID - */ - public static int resolveResourceIdFromAttr(final Context context, @AttrRes final int attr) { - final TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr}); - final int attributeResourceId = a.getResourceId(0, 0); - a.recycle(); - return attributeResourceId; - } - /** * Get a color from an attr styled according to the context's theme. * @@ -288,4 +281,21 @@ public final class ThemeHelper { return false; } } + + public static void setDayNightMode(final Context context) { + setDayNightMode(context, ThemeHelper.getSelectedThemeKey(context)); + } + + public static void setDayNightMode(final Context context, final String selectedThemeKey) { + final Resources res = context.getResources(); + + if (selectedThemeKey.equals(res.getString(R.string.light_theme_key))) { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + } else if (selectedThemeKey.equals(res.getString(R.string.dark_theme_key)) + || selectedThemeKey.equals(res.getString(R.string.black_theme_key))) { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + } else { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); + } + } } diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 3270b2b6f..b47bc97fd 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -224,10 +224,9 @@ public class MissionsFragment extends Fragment { mList.setAdapter(mAdapter); if (mSwitch != null) { - mSwitch.setIcon(ThemeHelper.resolveResourceIdFromAttr( - requireContext(), mLinear - ? R.attr.ic_grid - : R.attr.ic_list)); + mSwitch.setIcon(mLinear + ? R.drawable.ic_apps + : R.drawable.ic_list); mSwitch.setTitle(mLinear ? R.string.grid : R.string.list); mPrefs.edit().putBoolean("linear", mLinear).apply(); } diff --git a/app/src/main/java/us/shandian/giga/util/Utility.java b/app/src/main/java/us/shandian/giga/util/Utility.java index c090c7211..ab584f0e6 100644 --- a/app/src/main/java/us/shandian/giga/util/Utility.java +++ b/app/src/main/java/us/shandian/giga/util/Utility.java @@ -182,12 +182,12 @@ public class Utility { public static int getIconForFileType(FileType type) { switch (type) { case MUSIC: - return R.drawable.ic_headset_white_24dp; + return R.drawable.ic_headset; default: case VIDEO: - return R.drawable.ic_movie_white_24dp; + return R.drawable.ic_movie; case SUBTITLE: - return R.drawable.ic_subtitles_white_24dp; + return R.drawable.ic_subtitles; } } diff --git a/app/src/main/res/drawable-hdpi/ic_close_white_24dp_png.png b/app/src/main/res/drawable-hdpi/ic_close_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_close_white_24dp_png.png rename to app/src/main/res/drawable-hdpi/ic_close_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_hourglass_top_white_24dp_png.png b/app/src/main/res/drawable-hdpi/ic_hourglass_top_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_hourglass_top_white_24dp_png.png rename to app/src/main/res/drawable-hdpi/ic_hourglass_top_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_replay_white_24dp_png.png b/app/src/main/res/drawable-hdpi/ic_replay_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_replay_white_24dp_png.png rename to app/src/main/res/drawable-hdpi/ic_replay_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_close_white_24dp_png.png b/app/src/main/res/drawable-mdpi/ic_close_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_close_white_24dp_png.png rename to app/src/main/res/drawable-mdpi/ic_close_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_hourglass_top_white_24dp_png.png b/app/src/main/res/drawable-mdpi/ic_hourglass_top_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_hourglass_top_white_24dp_png.png rename to app/src/main/res/drawable-mdpi/ic_hourglass_top_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_replay_white_24dp_png.png b/app/src/main/res/drawable-mdpi/ic_replay_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_replay_white_24dp_png.png rename to app/src/main/res/drawable-mdpi/ic_replay_white.png diff --git a/app/src/main/res/drawable/ic_add_white_24dp.xml b/app/src/main/res/drawable-night/ic_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_add_white_24dp.xml rename to app/src/main/res/drawable-night/ic_add.xml diff --git a/app/src/main/res/drawable/ic_add_circle_outline_white_24dp.xml b/app/src/main/res/drawable-night/ic_add_circle_outline.xml similarity index 100% rename from app/src/main/res/drawable/ic_add_circle_outline_white_24dp.xml rename to app/src/main/res/drawable-night/ic_add_circle_outline.xml diff --git a/app/src/main/res/drawable/ic_apps_white_24dp.xml b/app/src/main/res/drawable-night/ic_apps.xml similarity index 100% rename from app/src/main/res/drawable/ic_apps_white_24dp.xml rename to app/src/main/res/drawable-night/ic_apps.xml diff --git a/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml b/app/src/main/res/drawable-night/ic_arrow_back.xml similarity index 100% rename from app/src/main/res/drawable/ic_arrow_back_white_24dp.xml rename to app/src/main/res/drawable-night/ic_arrow_back.xml diff --git a/app/src/main/res/drawable/ic_asterisk_white_24dp.xml b/app/src/main/res/drawable-night/ic_asterisk.xml similarity index 100% rename from app/src/main/res/drawable/ic_asterisk_white_24dp.xml rename to app/src/main/res/drawable-night/ic_asterisk.xml diff --git a/app/src/main/res/drawable/ic_attach_money_white_24dp.xml b/app/src/main/res/drawable-night/ic_attach_money.xml similarity index 100% rename from app/src/main/res/drawable/ic_attach_money_white_24dp.xml rename to app/src/main/res/drawable-night/ic_attach_money.xml diff --git a/app/src/main/res/drawable/ic_backup_white_24dp.xml b/app/src/main/res/drawable-night/ic_backup.xml similarity index 100% rename from app/src/main/res/drawable/ic_backup_white_24dp.xml rename to app/src/main/res/drawable-night/ic_backup.xml diff --git a/app/src/main/res/drawable/ic_bookmark_white_24dp.xml b/app/src/main/res/drawable-night/ic_bookmark.xml similarity index 100% rename from app/src/main/res/drawable/ic_bookmark_white_24dp.xml rename to app/src/main/res/drawable-night/ic_bookmark.xml diff --git a/app/src/main/res/drawable/ic_bug_report_white_24dp.xml b/app/src/main/res/drawable-night/ic_bug_report.xml similarity index 100% rename from app/src/main/res/drawable/ic_bug_report_white_24dp.xml rename to app/src/main/res/drawable-night/ic_bug_report.xml diff --git a/app/src/main/res/drawable/ic_cast_white_24dp.xml b/app/src/main/res/drawable-night/ic_cast.xml similarity index 100% rename from app/src/main/res/drawable/ic_cast_white_24dp.xml rename to app/src/main/res/drawable-night/ic_cast.xml diff --git a/app/src/main/res/drawable/ic_child_care_white_24dp.xml b/app/src/main/res/drawable-night/ic_child_care.xml similarity index 100% rename from app/src/main/res/drawable/ic_child_care_white_24dp.xml rename to app/src/main/res/drawable-night/ic_child_care.xml diff --git a/app/src/main/res/drawable/ic_close_white_24dp.xml b/app/src/main/res/drawable-night/ic_close.xml similarity index 100% rename from app/src/main/res/drawable/ic_close_white_24dp.xml rename to app/src/main/res/drawable-night/ic_close.xml diff --git a/app/src/main/res/drawable/ic_cloud_download_white_24dp.xml b/app/src/main/res/drawable-night/ic_cloud_download.xml similarity index 100% rename from app/src/main/res/drawable/ic_cloud_download_white_24dp.xml rename to app/src/main/res/drawable-night/ic_cloud_download.xml diff --git a/app/src/main/res/drawable/ic_computer_white_24dp.xml b/app/src/main/res/drawable-night/ic_computer.xml similarity index 100% rename from app/src/main/res/drawable/ic_computer_white_24dp.xml rename to app/src/main/res/drawable-night/ic_computer.xml diff --git a/app/src/main/res/drawable/ic_crop_portrait_white_24dp.xml b/app/src/main/res/drawable-night/ic_crop_portrait.xml similarity index 100% rename from app/src/main/res/drawable/ic_crop_portrait_white_24dp.xml rename to app/src/main/res/drawable-night/ic_crop_portrait.xml diff --git a/app/src/main/res/drawable/ic_delete_white_24dp.xml b/app/src/main/res/drawable-night/ic_delete.xml similarity index 100% rename from app/src/main/res/drawable/ic_delete_white_24dp.xml rename to app/src/main/res/drawable-night/ic_delete.xml diff --git a/app/src/main/res/drawable/ic_directions_bike_white_24dp.xml b/app/src/main/res/drawable-night/ic_directions_bike.xml similarity index 100% rename from app/src/main/res/drawable/ic_directions_bike_white_24dp.xml rename to app/src/main/res/drawable-night/ic_directions_bike.xml diff --git a/app/src/main/res/drawable/ic_directions_car_white_24dp.xml b/app/src/main/res/drawable-night/ic_directions_car.xml similarity index 100% rename from app/src/main/res/drawable/ic_directions_car_white_24dp.xml rename to app/src/main/res/drawable-night/ic_directions_car.xml diff --git a/app/src/main/res/drawable/ic_done_white_24dp.xml b/app/src/main/res/drawable-night/ic_done.xml similarity index 100% rename from app/src/main/res/drawable/ic_done_white_24dp.xml rename to app/src/main/res/drawable-night/ic_done.xml diff --git a/app/src/main/res/drawable/ic_drag_handle_white_24dp.xml b/app/src/main/res/drawable-night/ic_drag_handle.xml similarity index 100% rename from app/src/main/res/drawable/ic_drag_handle_white_24dp.xml rename to app/src/main/res/drawable-night/ic_drag_handle.xml diff --git a/app/src/main/res/drawable/ic_edit_white_24dp.xml b/app/src/main/res/drawable-night/ic_edit.xml similarity index 100% rename from app/src/main/res/drawable/ic_edit_white_24dp.xml rename to app/src/main/res/drawable-night/ic_edit.xml diff --git a/app/src/main/res/drawable/ic_expand_less_white_24dp.xml b/app/src/main/res/drawable-night/ic_expand_less.xml similarity index 100% rename from app/src/main/res/drawable/ic_expand_less_white_24dp.xml rename to app/src/main/res/drawable-night/ic_expand_less.xml diff --git a/app/src/main/res/drawable/ic_expand_more_white_24dp.xml b/app/src/main/res/drawable-night/ic_expand_more.xml similarity index 100% rename from app/src/main/res/drawable/ic_expand_more_white_24dp.xml rename to app/src/main/res/drawable-night/ic_expand_more.xml diff --git a/app/src/main/res/drawable/ic_explore_white_24dp.xml b/app/src/main/res/drawable-night/ic_explore.xml similarity index 100% rename from app/src/main/res/drawable/ic_explore_white_24dp.xml rename to app/src/main/res/drawable-night/ic_explore.xml diff --git a/app/src/main/res/drawable/ic_fastfood_white_24dp.xml b/app/src/main/res/drawable-night/ic_fastfood.xml similarity index 100% rename from app/src/main/res/drawable/ic_fastfood_white_24dp.xml rename to app/src/main/res/drawable-night/ic_fastfood.xml diff --git a/app/src/main/res/drawable/ic_favorite_white_24dp.xml b/app/src/main/res/drawable-night/ic_favorite.xml similarity index 100% rename from app/src/main/res/drawable/ic_favorite_white_24dp.xml rename to app/src/main/res/drawable-night/ic_favorite.xml diff --git a/app/src/main/res/drawable/ic_file_download_white_24dp.xml b/app/src/main/res/drawable-night/ic_file_download.xml similarity index 100% rename from app/src/main/res/drawable/ic_file_download_white_24dp.xml rename to app/src/main/res/drawable-night/ic_file_download.xml diff --git a/app/src/main/res/drawable/ic_filter_list_white_24dp.xml b/app/src/main/res/drawable-night/ic_filter_list.xml similarity index 100% rename from app/src/main/res/drawable/ic_filter_list_white_24dp.xml rename to app/src/main/res/drawable-night/ic_filter_list.xml diff --git a/app/src/main/res/drawable/ic_fitness_center_white_24dp.xml b/app/src/main/res/drawable-night/ic_fitness_center.xml similarity index 100% rename from app/src/main/res/drawable/ic_fitness_center_white_24dp.xml rename to app/src/main/res/drawable-night/ic_fitness_center.xml diff --git a/app/src/main/res/drawable/ic_headset_white_24dp.xml b/app/src/main/res/drawable-night/ic_headset.xml similarity index 100% rename from app/src/main/res/drawable/ic_headset_white_24dp.xml rename to app/src/main/res/drawable-night/ic_headset.xml diff --git a/app/src/main/res/drawable/ic_help_white_24dp.xml b/app/src/main/res/drawable-night/ic_help.xml similarity index 100% rename from app/src/main/res/drawable/ic_help_white_24dp.xml rename to app/src/main/res/drawable-night/ic_help.xml diff --git a/app/src/main/res/drawable/ic_history_white_24dp.xml b/app/src/main/res/drawable-night/ic_history.xml similarity index 100% rename from app/src/main/res/drawable/ic_history_white_24dp.xml rename to app/src/main/res/drawable-night/ic_history.xml diff --git a/app/src/main/res/drawable/ic_home_white_24dp.xml b/app/src/main/res/drawable-night/ic_home.xml similarity index 100% rename from app/src/main/res/drawable/ic_home_white_24dp.xml rename to app/src/main/res/drawable-night/ic_home.xml diff --git a/app/src/main/res/drawable/ic_import_export_white_24dp.xml b/app/src/main/res/drawable-night/ic_import_export.xml similarity index 100% rename from app/src/main/res/drawable/ic_import_export_white_24dp.xml rename to app/src/main/res/drawable-night/ic_import_export.xml diff --git a/app/src/main/res/drawable/ic_info_outline_white_24dp.xml b/app/src/main/res/drawable-night/ic_info_outline.xml similarity index 100% rename from app/src/main/res/drawable/ic_info_outline_white_24dp.xml rename to app/src/main/res/drawable-night/ic_info_outline.xml diff --git a/app/src/main/res/drawable/ic_insert_emoticon_white_24dp.xml b/app/src/main/res/drawable-night/ic_insert_emoticon.xml similarity index 100% rename from app/src/main/res/drawable/ic_insert_emoticon_white_24dp.xml rename to app/src/main/res/drawable-night/ic_insert_emoticon.xml diff --git a/app/src/main/res/drawable/ic_language_white_24dp.xml b/app/src/main/res/drawable-night/ic_language.xml similarity index 100% rename from app/src/main/res/drawable/ic_language_white_24dp.xml rename to app/src/main/res/drawable-night/ic_language.xml diff --git a/app/src/main/res/drawable/ic_list_white_24dp.xml b/app/src/main/res/drawable-night/ic_list.xml similarity index 100% rename from app/src/main/res/drawable/ic_list_white_24dp.xml rename to app/src/main/res/drawable-night/ic_list.xml diff --git a/app/src/main/res/drawable/ic_live_tv_white_24dp.xml b/app/src/main/res/drawable-night/ic_live_tv.xml similarity index 100% rename from app/src/main/res/drawable/ic_live_tv_white_24dp.xml rename to app/src/main/res/drawable-night/ic_live_tv.xml diff --git a/app/src/main/res/drawable/ic_megaphone_white_24dp.xml b/app/src/main/res/drawable-night/ic_megaphone.xml similarity index 100% rename from app/src/main/res/drawable/ic_megaphone_white_24dp.xml rename to app/src/main/res/drawable-night/ic_megaphone.xml diff --git a/app/src/main/res/drawable/ic_mic_white_24dp.xml b/app/src/main/res/drawable-night/ic_mic.xml similarity index 100% rename from app/src/main/res/drawable/ic_mic_white_24dp.xml rename to app/src/main/res/drawable-night/ic_mic.xml diff --git a/app/src/main/res/drawable/ic_more_vert_white_24dp.xml b/app/src/main/res/drawable-night/ic_more_vert.xml similarity index 100% rename from app/src/main/res/drawable/ic_more_vert_white_24dp.xml rename to app/src/main/res/drawable-night/ic_more_vert.xml diff --git a/app/src/main/res/drawable/ic_motorcycle_white_24dp.xml b/app/src/main/res/drawable-night/ic_motorcycle.xml similarity index 100% rename from app/src/main/res/drawable/ic_motorcycle_white_24dp.xml rename to app/src/main/res/drawable-night/ic_motorcycle.xml diff --git a/app/src/main/res/drawable/ic_movie_white_24dp.xml b/app/src/main/res/drawable-night/ic_movie.xml similarity index 100% rename from app/src/main/res/drawable/ic_movie_white_24dp.xml rename to app/src/main/res/drawable-night/ic_movie.xml diff --git a/app/src/main/res/drawable/ic_music_note_white_24dp.xml b/app/src/main/res/drawable-night/ic_music_note.xml similarity index 100% rename from app/src/main/res/drawable/ic_music_note_white_24dp.xml rename to app/src/main/res/drawable-night/ic_music_note.xml diff --git a/app/src/main/res/drawable/ic_palette_white_24dp.xml b/app/src/main/res/drawable-night/ic_palette.xml similarity index 100% rename from app/src/main/res/drawable/ic_palette_white_24dp.xml rename to app/src/main/res/drawable-night/ic_palette.xml diff --git a/app/src/main/res/drawable/ic_pause_white_24dp.xml b/app/src/main/res/drawable-night/ic_pause.xml similarity index 100% rename from app/src/main/res/drawable/ic_pause_white_24dp.xml rename to app/src/main/res/drawable-night/ic_pause.xml diff --git a/app/src/main/res/drawable/ic_people_white_24dp.xml b/app/src/main/res/drawable-night/ic_people.xml similarity index 100% rename from app/src/main/res/drawable/ic_people_white_24dp.xml rename to app/src/main/res/drawable-night/ic_people.xml diff --git a/app/src/main/res/drawable/ic_person_white_24dp.xml b/app/src/main/res/drawable-night/ic_person.xml similarity index 100% rename from app/src/main/res/drawable/ic_person_white_24dp.xml rename to app/src/main/res/drawable-night/ic_person.xml diff --git a/app/src/main/res/drawable/ic_pets_white_24dp.xml b/app/src/main/res/drawable-night/ic_pets.xml similarity index 100% rename from app/src/main/res/drawable/ic_pets_white_24dp.xml rename to app/src/main/res/drawable-night/ic_pets.xml diff --git a/app/src/main/res/drawable/ic_picture_in_picture_white_24dp.xml b/app/src/main/res/drawable-night/ic_picture_in_picture.xml similarity index 100% rename from app/src/main/res/drawable/ic_picture_in_picture_white_24dp.xml rename to app/src/main/res/drawable-night/ic_picture_in_picture.xml diff --git a/app/src/main/res/drawable/ic_play_arrow_white_24dp.xml b/app/src/main/res/drawable-night/ic_play_arrow.xml similarity index 100% rename from app/src/main/res/drawable/ic_play_arrow_white_24dp.xml rename to app/src/main/res/drawable-night/ic_play_arrow.xml diff --git a/app/src/main/res/drawable/ic_playlist_add_white_24dp.xml b/app/src/main/res/drawable-night/ic_playlist_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_playlist_add_white_24dp.xml rename to app/src/main/res/drawable-night/ic_playlist_add.xml diff --git a/app/src/main/res/drawable/ic_playlist_add_check_white_24dp.xml b/app/src/main/res/drawable-night/ic_playlist_add_check.xml similarity index 100% rename from app/src/main/res/drawable/ic_playlist_add_check_white_24dp.xml rename to app/src/main/res/drawable-night/ic_playlist_add_check.xml diff --git a/app/src/main/res/drawable/ic_public_white_24dp.xml b/app/src/main/res/drawable-night/ic_public.xml similarity index 100% rename from app/src/main/res/drawable/ic_public_white_24dp.xml rename to app/src/main/res/drawable-night/ic_public.xml diff --git a/app/src/main/res/drawable/ic_radio_white_24dp.xml b/app/src/main/res/drawable-night/ic_radio.xml similarity index 100% rename from app/src/main/res/drawable/ic_radio_white_24dp.xml rename to app/src/main/res/drawable-night/ic_radio.xml diff --git a/app/src/main/res/drawable/ic_refresh_white_24dp.xml b/app/src/main/res/drawable-night/ic_refresh.xml similarity index 100% rename from app/src/main/res/drawable/ic_refresh_white_24dp.xml rename to app/src/main/res/drawable-night/ic_refresh.xml diff --git a/app/src/main/res/drawable/ic_restaurant_white_24dp.xml b/app/src/main/res/drawable-night/ic_restaurant.xml similarity index 100% rename from app/src/main/res/drawable/ic_restaurant_white_24dp.xml rename to app/src/main/res/drawable-night/ic_restaurant.xml diff --git a/app/src/main/res/drawable/ic_rss_feed_white_24dp.xml b/app/src/main/res/drawable-night/ic_rss_feed.xml similarity index 100% rename from app/src/main/res/drawable/ic_rss_feed_white_24dp.xml rename to app/src/main/res/drawable-night/ic_rss_feed.xml diff --git a/app/src/main/res/drawable/ic_save_white_24dp.xml b/app/src/main/res/drawable-night/ic_save.xml similarity index 100% rename from app/src/main/res/drawable/ic_save_white_24dp.xml rename to app/src/main/res/drawable-night/ic_save.xml diff --git a/app/src/main/res/drawable/ic_school_white_24dp.xml b/app/src/main/res/drawable-night/ic_school.xml similarity index 100% rename from app/src/main/res/drawable/ic_school_white_24dp.xml rename to app/src/main/res/drawable-night/ic_school.xml diff --git a/app/src/main/res/drawable/ic_search_white_24dp.xml b/app/src/main/res/drawable-night/ic_search.xml similarity index 100% rename from app/src/main/res/drawable/ic_search_white_24dp.xml rename to app/src/main/res/drawable-night/ic_search.xml diff --git a/app/src/main/res/drawable/ic_search_add_white_24dp.xml b/app/src/main/res/drawable-night/ic_search_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_search_add_white_24dp.xml rename to app/src/main/res/drawable-night/ic_search_add.xml diff --git a/app/src/main/res/drawable/ic_settings_white_24dp.xml b/app/src/main/res/drawable-night/ic_settings.xml similarity index 100% rename from app/src/main/res/drawable/ic_settings_white_24dp.xml rename to app/src/main/res/drawable-night/ic_settings.xml diff --git a/app/src/main/res/drawable/ic_share_white_24dp.xml b/app/src/main/res/drawable-night/ic_share.xml similarity index 100% rename from app/src/main/res/drawable/ic_share_white_24dp.xml rename to app/src/main/res/drawable-night/ic_share.xml diff --git a/app/src/main/res/drawable/ic_shopping_cart_white_24dp.xml b/app/src/main/res/drawable-night/ic_shopping_cart.xml similarity index 100% rename from app/src/main/res/drawable/ic_shopping_cart_white_24dp.xml rename to app/src/main/res/drawable-night/ic_shopping_cart.xml diff --git a/app/src/main/res/drawable/ic_sort_white_24dp.xml b/app/src/main/res/drawable-night/ic_sort.xml similarity index 100% rename from app/src/main/res/drawable/ic_sort_white_24dp.xml rename to app/src/main/res/drawable-night/ic_sort.xml diff --git a/app/src/main/res/drawable/ic_stars_white_24dp.xml b/app/src/main/res/drawable-night/ic_stars.xml similarity index 100% rename from app/src/main/res/drawable/ic_stars_white_24dp.xml rename to app/src/main/res/drawable-night/ic_stars.xml diff --git a/app/src/main/res/drawable/ic_telescope_white_24dp.xml b/app/src/main/res/drawable-night/ic_telescope.xml similarity index 100% rename from app/src/main/res/drawable/ic_telescope_white_24dp.xml rename to app/src/main/res/drawable-night/ic_telescope.xml diff --git a/app/src/main/res/drawable/ic_thumb_down_white_24dp.xml b/app/src/main/res/drawable-night/ic_thumb_down.xml similarity index 100% rename from app/src/main/res/drawable/ic_thumb_down_white_24dp.xml rename to app/src/main/res/drawable-night/ic_thumb_down.xml diff --git a/app/src/main/res/drawable/ic_thumb_up_white_24dp.xml b/app/src/main/res/drawable-night/ic_thumb_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_thumb_up_white_24dp.xml rename to app/src/main/res/drawable-night/ic_thumb_up.xml diff --git a/app/src/main/res/drawable/ic_trending_up_white_24dp.xml b/app/src/main/res/drawable-night/ic_trending_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_trending_up_white_24dp.xml rename to app/src/main/res/drawable-night/ic_trending_up.xml diff --git a/app/src/main/res/drawable/ic_tv_white_24dp.xml b/app/src/main/res/drawable-night/ic_tv.xml similarity index 100% rename from app/src/main/res/drawable/ic_tv_white_24dp.xml rename to app/src/main/res/drawable-night/ic_tv.xml diff --git a/app/src/main/res/drawable/ic_videogame_asset_white_24dp.xml b/app/src/main/res/drawable-night/ic_videogame_asset.xml similarity index 100% rename from app/src/main/res/drawable/ic_videogame_asset_white_24dp.xml rename to app/src/main/res/drawable-night/ic_videogame_asset.xml diff --git a/app/src/main/res/drawable/ic_volume_off_black_24dp.xml b/app/src/main/res/drawable-night/ic_volume_off.xml similarity index 99% rename from app/src/main/res/drawable/ic_volume_off_black_24dp.xml rename to app/src/main/res/drawable-night/ic_volume_off.xml index 19f166ddc..912a2ff68 100644 --- a/app/src/main/res/drawable/ic_volume_off_black_24dp.xml +++ b/app/src/main/res/drawable-night/ic_volume_off.xml @@ -7,3 +7,4 @@ android:fillColor="#FF000000" android:pathData="M16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v2.21l2.45,2.45c0.03,-0.2 0.05,-0.41 0.05,-0.63zM19,12c0,0.94 -0.2,1.82 -0.54,2.64l1.51,1.51C20.63,14.91 21,13.5 21,12c0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM4.27,3L3,4.27 7.73,9L3,9v6h4l5,5v-6.73l4.25,4.25c-0.67,0.52 -1.42,0.93 -2.25,1.18v2.06c1.38,-0.31 2.63,-0.95 3.69,-1.81L19.73,21 21,19.73l-9,-9L4.27,3zM12,4L9.91,6.09 12,8.18L12,4z" /> + diff --git a/app/src/main/res/drawable/ic_volume_up_white_24dp.xml b/app/src/main/res/drawable-night/ic_volume_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_volume_up_white_24dp.xml rename to app/src/main/res/drawable-night/ic_volume_up.xml diff --git a/app/src/main/res/drawable/ic_watch_later_white_24dp.xml b/app/src/main/res/drawable-night/ic_watch_later.xml similarity index 100% rename from app/src/main/res/drawable/ic_watch_later_white_24dp.xml rename to app/src/main/res/drawable-night/ic_watch_later.xml diff --git a/app/src/main/res/drawable/ic_wb_sunny_white_24dp.xml b/app/src/main/res/drawable-night/ic_wb_sunny.xml similarity index 100% rename from app/src/main/res/drawable/ic_wb_sunny_white_24dp.xml rename to app/src/main/res/drawable-night/ic_wb_sunny.xml diff --git a/app/src/main/res/drawable/ic_whatshot_white_24dp.xml b/app/src/main/res/drawable-night/ic_whatshot.xml similarity index 100% rename from app/src/main/res/drawable/ic_whatshot_white_24dp.xml rename to app/src/main/res/drawable-night/ic_whatshot.xml diff --git a/app/src/main/res/drawable/ic_work_white_24dp.xml b/app/src/main/res/drawable-night/ic_work.xml similarity index 100% rename from app/src/main/res/drawable/ic_work_white_24dp.xml rename to app/src/main/res/drawable-night/ic_work.xml diff --git a/app/src/main/res/drawable-xhdpi/ic_close_white_24dp_png.png b/app/src/main/res/drawable-xhdpi/ic_close_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_close_white_24dp_png.png rename to app/src/main/res/drawable-xhdpi/ic_close_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_hourglass_top_white_24dp_png.png b/app/src/main/res/drawable-xhdpi/ic_hourglass_top_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_hourglass_top_white_24dp_png.png rename to app/src/main/res/drawable-xhdpi/ic_hourglass_top_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_replay_white_24dp_png.png b/app/src/main/res/drawable-xhdpi/ic_replay_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_replay_white_24dp_png.png rename to app/src/main/res/drawable-xhdpi/ic_replay_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_close_white_24dp_png.png b/app/src/main/res/drawable-xxhdpi/ic_close_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_close_white_24dp_png.png rename to app/src/main/res/drawable-xxhdpi/ic_close_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_hourglass_top_white_24dp_png.png b/app/src/main/res/drawable-xxhdpi/ic_hourglass_top_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_hourglass_top_white_24dp_png.png rename to app/src/main/res/drawable-xxhdpi/ic_hourglass_top_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp_png.png b/app/src/main/res/drawable-xxhdpi/ic_replay_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp_png.png rename to app/src/main/res/drawable-xxhdpi/ic_replay_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp_png.png b/app/src/main/res/drawable-xxxhdpi/ic_close_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp_png.png rename to app/src/main/res/drawable-xxxhdpi/ic_close_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_hourglass_top_white_24dp_png.png b/app/src/main/res/drawable-xxxhdpi/ic_hourglass_top_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_hourglass_top_white_24dp_png.png rename to app/src/main/res/drawable-xxxhdpi/ic_hourglass_top_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp_png.png b/app/src/main/res/drawable-xxxhdpi/ic_replay_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp_png.png rename to app/src/main/res/drawable-xxxhdpi/ic_replay_white.png diff --git a/app/src/main/res/drawable/ic_add_black_24dp.xml b/app/src/main/res/drawable/ic_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_add_black_24dp.xml rename to app/src/main/res/drawable/ic_add.xml diff --git a/app/src/main/res/drawable/ic_add_circle_outline_black_24dp.xml b/app/src/main/res/drawable/ic_add_circle_outline.xml similarity index 100% rename from app/src/main/res/drawable/ic_add_circle_outline_black_24dp.xml rename to app/src/main/res/drawable/ic_add_circle_outline.xml diff --git a/app/src/main/res/drawable/ic_apps_black_24dp.xml b/app/src/main/res/drawable/ic_apps.xml similarity index 100% rename from app/src/main/res/drawable/ic_apps_black_24dp.xml rename to app/src/main/res/drawable/ic_apps.xml diff --git a/app/src/main/res/drawable/ic_arrow_back_black_24dp.xml b/app/src/main/res/drawable/ic_arrow_back.xml similarity index 100% rename from app/src/main/res/drawable/ic_arrow_back_black_24dp.xml rename to app/src/main/res/drawable/ic_arrow_back.xml diff --git a/app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml b/app/src/main/res/drawable/ic_arrow_drop_down.xml similarity index 100% rename from app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml rename to app/src/main/res/drawable/ic_arrow_drop_down.xml diff --git a/app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml b/app/src/main/res/drawable/ic_arrow_drop_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml rename to app/src/main/res/drawable/ic_arrow_drop_up.xml diff --git a/app/src/main/res/drawable/ic_art_track_white_24dp.xml b/app/src/main/res/drawable/ic_art_track.xml similarity index 100% rename from app/src/main/res/drawable/ic_art_track_white_24dp.xml rename to app/src/main/res/drawable/ic_art_track.xml diff --git a/app/src/main/res/drawable/ic_asterisk_black_24dp.xml b/app/src/main/res/drawable/ic_asterisk.xml similarity index 100% rename from app/src/main/res/drawable/ic_asterisk_black_24dp.xml rename to app/src/main/res/drawable/ic_asterisk.xml diff --git a/app/src/main/res/drawable/ic_attach_money_black_24dp.xml b/app/src/main/res/drawable/ic_attach_money.xml similarity index 100% rename from app/src/main/res/drawable/ic_attach_money_black_24dp.xml rename to app/src/main/res/drawable/ic_attach_money.xml diff --git a/app/src/main/res/drawable/ic_backup_black_24dp.xml b/app/src/main/res/drawable/ic_backup.xml similarity index 100% rename from app/src/main/res/drawable/ic_backup_black_24dp.xml rename to app/src/main/res/drawable/ic_backup.xml diff --git a/app/src/main/res/drawable/ic_bookmark_black_24dp.xml b/app/src/main/res/drawable/ic_bookmark.xml similarity index 100% rename from app/src/main/res/drawable/ic_bookmark_black_24dp.xml rename to app/src/main/res/drawable/ic_bookmark.xml diff --git a/app/src/main/res/drawable/ic_brightness_high_white_24dp.xml b/app/src/main/res/drawable/ic_brightness_high.xml similarity index 100% rename from app/src/main/res/drawable/ic_brightness_high_white_24dp.xml rename to app/src/main/res/drawable/ic_brightness_high.xml diff --git a/app/src/main/res/drawable/ic_brightness_low_white_24dp.xml b/app/src/main/res/drawable/ic_brightness_low.xml similarity index 100% rename from app/src/main/res/drawable/ic_brightness_low_white_24dp.xml rename to app/src/main/res/drawable/ic_brightness_low.xml diff --git a/app/src/main/res/drawable/ic_brightness_medium_white_24dp.xml b/app/src/main/res/drawable/ic_brightness_medium.xml similarity index 100% rename from app/src/main/res/drawable/ic_brightness_medium_white_24dp.xml rename to app/src/main/res/drawable/ic_brightness_medium.xml diff --git a/app/src/main/res/drawable/ic_bug_report_black_24dp.xml b/app/src/main/res/drawable/ic_bug_report.xml similarity index 100% rename from app/src/main/res/drawable/ic_bug_report_black_24dp.xml rename to app/src/main/res/drawable/ic_bug_report.xml diff --git a/app/src/main/res/drawable/ic_cast_black_24dp.xml b/app/src/main/res/drawable/ic_cast.xml similarity index 100% rename from app/src/main/res/drawable/ic_cast_black_24dp.xml rename to app/src/main/res/drawable/ic_cast.xml diff --git a/app/src/main/res/drawable/ic_child_care_black_24dp.xml b/app/src/main/res/drawable/ic_child_care.xml similarity index 100% rename from app/src/main/res/drawable/ic_child_care_black_24dp.xml rename to app/src/main/res/drawable/ic_child_care.xml diff --git a/app/src/main/res/drawable/ic_close_black_24dp.xml b/app/src/main/res/drawable/ic_close.xml similarity index 100% rename from app/src/main/res/drawable/ic_close_black_24dp.xml rename to app/src/main/res/drawable/ic_close.xml diff --git a/app/src/main/res/drawable/ic_cloud_download_black_24dp.xml b/app/src/main/res/drawable/ic_cloud_download.xml similarity index 100% rename from app/src/main/res/drawable/ic_cloud_download_black_24dp.xml rename to app/src/main/res/drawable/ic_cloud_download.xml diff --git a/app/src/main/res/drawable/ic_comment_white_24dp.xml b/app/src/main/res/drawable/ic_comment.xml similarity index 100% rename from app/src/main/res/drawable/ic_comment_white_24dp.xml rename to app/src/main/res/drawable/ic_comment.xml diff --git a/app/src/main/res/drawable/ic_computer_black_24dp.xml b/app/src/main/res/drawable/ic_computer.xml similarity index 100% rename from app/src/main/res/drawable/ic_computer_black_24dp.xml rename to app/src/main/res/drawable/ic_computer.xml diff --git a/app/src/main/res/drawable/ic_crop_portrait_black_24dp.xml b/app/src/main/res/drawable/ic_crop_portrait.xml similarity index 100% rename from app/src/main/res/drawable/ic_crop_portrait_black_24dp.xml rename to app/src/main/res/drawable/ic_crop_portrait.xml diff --git a/app/src/main/res/drawable/ic_delete_black_24dp.xml b/app/src/main/res/drawable/ic_delete.xml similarity index 100% rename from app/src/main/res/drawable/ic_delete_black_24dp.xml rename to app/src/main/res/drawable/ic_delete.xml diff --git a/app/src/main/res/drawable/ic_description_white_24dp.xml b/app/src/main/res/drawable/ic_description.xml similarity index 100% rename from app/src/main/res/drawable/ic_description_white_24dp.xml rename to app/src/main/res/drawable/ic_description.xml diff --git a/app/src/main/res/drawable/ic_directions_bike_black_24dp.xml b/app/src/main/res/drawable/ic_directions_bike.xml similarity index 100% rename from app/src/main/res/drawable/ic_directions_bike_black_24dp.xml rename to app/src/main/res/drawable/ic_directions_bike.xml diff --git a/app/src/main/res/drawable/ic_directions_car_black_24dp.xml b/app/src/main/res/drawable/ic_directions_car.xml similarity index 100% rename from app/src/main/res/drawable/ic_directions_car_black_24dp.xml rename to app/src/main/res/drawable/ic_directions_car.xml diff --git a/app/src/main/res/drawable/ic_done_black_24dp.xml b/app/src/main/res/drawable/ic_done.xml similarity index 100% rename from app/src/main/res/drawable/ic_done_black_24dp.xml rename to app/src/main/res/drawable/ic_done.xml diff --git a/app/src/main/res/drawable/ic_drag_handle_black_24dp.xml b/app/src/main/res/drawable/ic_drag_handle.xml similarity index 100% rename from app/src/main/res/drawable/ic_drag_handle_black_24dp.xml rename to app/src/main/res/drawable/ic_drag_handle.xml diff --git a/app/src/main/res/drawable/ic_edit_black_24dp.xml b/app/src/main/res/drawable/ic_edit.xml similarity index 100% rename from app/src/main/res/drawable/ic_edit_black_24dp.xml rename to app/src/main/res/drawable/ic_edit.xml diff --git a/app/src/main/res/drawable/ic_expand_less_black_24dp.xml b/app/src/main/res/drawable/ic_expand_less.xml similarity index 100% rename from app/src/main/res/drawable/ic_expand_less_black_24dp.xml rename to app/src/main/res/drawable/ic_expand_less.xml diff --git a/app/src/main/res/drawable/ic_expand_more_black_24dp.xml b/app/src/main/res/drawable/ic_expand_more.xml similarity index 100% rename from app/src/main/res/drawable/ic_expand_more_black_24dp.xml rename to app/src/main/res/drawable/ic_expand_more.xml diff --git a/app/src/main/res/drawable/ic_explore_black_24dp.xml b/app/src/main/res/drawable/ic_explore.xml similarity index 100% rename from app/src/main/res/drawable/ic_explore_black_24dp.xml rename to app/src/main/res/drawable/ic_explore.xml diff --git a/app/src/main/res/drawable/ic_fast_forward_white_24dp.xml b/app/src/main/res/drawable/ic_fast_forward.xml similarity index 100% rename from app/src/main/res/drawable/ic_fast_forward_white_24dp.xml rename to app/src/main/res/drawable/ic_fast_forward.xml diff --git a/app/src/main/res/drawable/ic_fast_rewind_white_24dp.xml b/app/src/main/res/drawable/ic_fast_rewind.xml similarity index 100% rename from app/src/main/res/drawable/ic_fast_rewind_white_24dp.xml rename to app/src/main/res/drawable/ic_fast_rewind.xml diff --git a/app/src/main/res/drawable/ic_fastfood_black_24dp.xml b/app/src/main/res/drawable/ic_fastfood.xml similarity index 100% rename from app/src/main/res/drawable/ic_fastfood_black_24dp.xml rename to app/src/main/res/drawable/ic_fastfood.xml diff --git a/app/src/main/res/drawable/ic_favorite_black_24dp.xml b/app/src/main/res/drawable/ic_favorite.xml similarity index 100% rename from app/src/main/res/drawable/ic_favorite_black_24dp.xml rename to app/src/main/res/drawable/ic_favorite.xml diff --git a/app/src/main/res/drawable/ic_file_download_black_24dp.xml b/app/src/main/res/drawable/ic_file_download.xml similarity index 100% rename from app/src/main/res/drawable/ic_file_download_black_24dp.xml rename to app/src/main/res/drawable/ic_file_download.xml diff --git a/app/src/main/res/drawable/ic_filter_list_black_24dp.xml b/app/src/main/res/drawable/ic_filter_list.xml similarity index 100% rename from app/src/main/res/drawable/ic_filter_list_black_24dp.xml rename to app/src/main/res/drawable/ic_filter_list.xml diff --git a/app/src/main/res/drawable/ic_fitness_center_black_24dp.xml b/app/src/main/res/drawable/ic_fitness_center.xml similarity index 100% rename from app/src/main/res/drawable/ic_fitness_center_black_24dp.xml rename to app/src/main/res/drawable/ic_fitness_center.xml diff --git a/app/src/main/res/drawable/ic_format_list_numbered_white_24.xml b/app/src/main/res/drawable/ic_format_list_numbered.xml similarity index 100% rename from app/src/main/res/drawable/ic_format_list_numbered_white_24.xml rename to app/src/main/res/drawable/ic_format_list_numbered.xml diff --git a/app/src/main/res/drawable/ic_fullscreen_white_24dp.xml b/app/src/main/res/drawable/ic_fullscreen.xml similarity index 100% rename from app/src/main/res/drawable/ic_fullscreen_white_24dp.xml rename to app/src/main/res/drawable/ic_fullscreen.xml diff --git a/app/src/main/res/drawable/ic_fullscreen_exit_white_24dp.xml b/app/src/main/res/drawable/ic_fullscreen_exit.xml similarity index 100% rename from app/src/main/res/drawable/ic_fullscreen_exit_white_24dp.xml rename to app/src/main/res/drawable/ic_fullscreen_exit.xml diff --git a/app/src/main/res/drawable/ic_headset_black_24dp.xml b/app/src/main/res/drawable/ic_headset.xml similarity index 100% rename from app/src/main/res/drawable/ic_headset_black_24dp.xml rename to app/src/main/res/drawable/ic_headset.xml diff --git a/app/src/main/res/drawable/ic_help_black_24dp.xml b/app/src/main/res/drawable/ic_help.xml similarity index 100% rename from app/src/main/res/drawable/ic_help_black_24dp.xml rename to app/src/main/res/drawable/ic_help.xml diff --git a/app/src/main/res/drawable/ic_history_black_24dp.xml b/app/src/main/res/drawable/ic_history.xml similarity index 100% rename from app/src/main/res/drawable/ic_history_black_24dp.xml rename to app/src/main/res/drawable/ic_history.xml diff --git a/app/src/main/res/drawable/ic_home_black_24dp.xml b/app/src/main/res/drawable/ic_home.xml similarity index 100% rename from app/src/main/res/drawable/ic_home_black_24dp.xml rename to app/src/main/res/drawable/ic_home.xml diff --git a/app/src/main/res/drawable/ic_hourglass_top_white_24dp.xml b/app/src/main/res/drawable/ic_hourglass_top.xml similarity index 100% rename from app/src/main/res/drawable/ic_hourglass_top_white_24dp.xml rename to app/src/main/res/drawable/ic_hourglass_top.xml diff --git a/app/src/main/res/drawable/ic_import_export_black_24dp.xml b/app/src/main/res/drawable/ic_import_export.xml similarity index 100% rename from app/src/main/res/drawable/ic_import_export_black_24dp.xml rename to app/src/main/res/drawable/ic_import_export.xml diff --git a/app/src/main/res/drawable/ic_info_outline_black_24dp.xml b/app/src/main/res/drawable/ic_info_outline.xml similarity index 100% rename from app/src/main/res/drawable/ic_info_outline_black_24dp.xml rename to app/src/main/res/drawable/ic_info_outline.xml diff --git a/app/src/main/res/drawable/ic_insert_emoticon_black_24dp.xml b/app/src/main/res/drawable/ic_insert_emoticon.xml similarity index 100% rename from app/src/main/res/drawable/ic_insert_emoticon_black_24dp.xml rename to app/src/main/res/drawable/ic_insert_emoticon.xml diff --git a/app/src/main/res/drawable/ic_language_black_24dp.xml b/app/src/main/res/drawable/ic_language.xml similarity index 100% rename from app/src/main/res/drawable/ic_language_black_24dp.xml rename to app/src/main/res/drawable/ic_language.xml diff --git a/app/src/main/res/drawable/ic_list_black_24dp.xml b/app/src/main/res/drawable/ic_list.xml similarity index 100% rename from app/src/main/res/drawable/ic_list_black_24dp.xml rename to app/src/main/res/drawable/ic_list.xml diff --git a/app/src/main/res/drawable/ic_live_tv_black_24dp.xml b/app/src/main/res/drawable/ic_live_tv.xml similarity index 100% rename from app/src/main/res/drawable/ic_live_tv_black_24dp.xml rename to app/src/main/res/drawable/ic_live_tv.xml diff --git a/app/src/main/res/drawable/ic_megaphone_black_24dp.xml b/app/src/main/res/drawable/ic_megaphone.xml similarity index 100% rename from app/src/main/res/drawable/ic_megaphone_black_24dp.xml rename to app/src/main/res/drawable/ic_megaphone.xml diff --git a/app/src/main/res/drawable/ic_mic_black_24dp.xml b/app/src/main/res/drawable/ic_mic.xml similarity index 100% rename from app/src/main/res/drawable/ic_mic_black_24dp.xml rename to app/src/main/res/drawable/ic_mic.xml diff --git a/app/src/main/res/drawable/ic_more_vert_black_24dp.xml b/app/src/main/res/drawable/ic_more_vert.xml similarity index 100% rename from app/src/main/res/drawable/ic_more_vert_black_24dp.xml rename to app/src/main/res/drawable/ic_more_vert.xml diff --git a/app/src/main/res/drawable/ic_motorcycle_black_24dp.xml b/app/src/main/res/drawable/ic_motorcycle.xml similarity index 100% rename from app/src/main/res/drawable/ic_motorcycle_black_24dp.xml rename to app/src/main/res/drawable/ic_motorcycle.xml diff --git a/app/src/main/res/drawable/ic_movie_black_24dp.xml b/app/src/main/res/drawable/ic_movie.xml similarity index 100% rename from app/src/main/res/drawable/ic_movie_black_24dp.xml rename to app/src/main/res/drawable/ic_movie.xml diff --git a/app/src/main/res/drawable/ic_music_note_black_24dp.xml b/app/src/main/res/drawable/ic_music_note.xml similarity index 100% rename from app/src/main/res/drawable/ic_music_note_black_24dp.xml rename to app/src/main/res/drawable/ic_music_note.xml diff --git a/app/src/main/res/drawable/ic_next_white_24dp.xml b/app/src/main/res/drawable/ic_next.xml similarity index 100% rename from app/src/main/res/drawable/ic_next_white_24dp.xml rename to app/src/main/res/drawable/ic_next.xml diff --git a/app/src/main/res/drawable/ic_palette_black_24dp.xml b/app/src/main/res/drawable/ic_palette.xml similarity index 100% rename from app/src/main/res/drawable/ic_palette_black_24dp.xml rename to app/src/main/res/drawable/ic_palette.xml diff --git a/app/src/main/res/drawable/ic_pause_black_24dp.xml b/app/src/main/res/drawable/ic_pause.xml similarity index 100% rename from app/src/main/res/drawable/ic_pause_black_24dp.xml rename to app/src/main/res/drawable/ic_pause.xml diff --git a/app/src/main/res/drawable/ic_people_black_24dp.xml b/app/src/main/res/drawable/ic_people.xml similarity index 100% rename from app/src/main/res/drawable/ic_people_black_24dp.xml rename to app/src/main/res/drawable/ic_people.xml diff --git a/app/src/main/res/drawable/ic_person_black_24dp.xml b/app/src/main/res/drawable/ic_person.xml similarity index 100% rename from app/src/main/res/drawable/ic_person_black_24dp.xml rename to app/src/main/res/drawable/ic_person.xml diff --git a/app/src/main/res/drawable/ic_pets_black_24dp.xml b/app/src/main/res/drawable/ic_pets.xml similarity index 100% rename from app/src/main/res/drawable/ic_pets_black_24dp.xml rename to app/src/main/res/drawable/ic_pets.xml diff --git a/app/src/main/res/drawable/ic_picture_in_picture_black_24dp.xml b/app/src/main/res/drawable/ic_picture_in_picture.xml similarity index 100% rename from app/src/main/res/drawable/ic_picture_in_picture_black_24dp.xml rename to app/src/main/res/drawable/ic_picture_in_picture.xml diff --git a/app/src/main/res/drawable/ic_play_arrow_black_24dp.xml b/app/src/main/res/drawable/ic_play_arrow.xml similarity index 100% rename from app/src/main/res/drawable/ic_play_arrow_black_24dp.xml rename to app/src/main/res/drawable/ic_play_arrow.xml diff --git a/app/src/main/res/drawable/ic_playlist_add_black_24dp.xml b/app/src/main/res/drawable/ic_playlist_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_playlist_add_black_24dp.xml rename to app/src/main/res/drawable/ic_playlist_add.xml diff --git a/app/src/main/res/drawable/ic_playlist_add_check_black_24dp.xml b/app/src/main/res/drawable/ic_playlist_add_check.xml similarity index 100% rename from app/src/main/res/drawable/ic_playlist_add_check_black_24dp.xml rename to app/src/main/res/drawable/ic_playlist_add_check.xml diff --git a/app/src/main/res/drawable/ic_playlist_play_white_24dp.xml b/app/src/main/res/drawable/ic_playlist_play.xml similarity index 100% rename from app/src/main/res/drawable/ic_playlist_play_white_24dp.xml rename to app/src/main/res/drawable/ic_playlist_play.xml diff --git a/app/src/main/res/drawable/ic_previous_white_24dp.xml b/app/src/main/res/drawable/ic_previous.xml similarity index 100% rename from app/src/main/res/drawable/ic_previous_white_24dp.xml rename to app/src/main/res/drawable/ic_previous.xml diff --git a/app/src/main/res/drawable/ic_public_black_24dp.xml b/app/src/main/res/drawable/ic_public.xml similarity index 100% rename from app/src/main/res/drawable/ic_public_black_24dp.xml rename to app/src/main/res/drawable/ic_public.xml diff --git a/app/src/main/res/drawable/ic_radio_black_24dp.xml b/app/src/main/res/drawable/ic_radio.xml similarity index 100% rename from app/src/main/res/drawable/ic_radio_black_24dp.xml rename to app/src/main/res/drawable/ic_radio.xml diff --git a/app/src/main/res/drawable/ic_refresh_black_24dp.xml b/app/src/main/res/drawable/ic_refresh.xml similarity index 100% rename from app/src/main/res/drawable/ic_refresh_black_24dp.xml rename to app/src/main/res/drawable/ic_refresh.xml diff --git a/app/src/main/res/drawable/ic_repeat_white_24dp.xml b/app/src/main/res/drawable/ic_repeat.xml similarity index 100% rename from app/src/main/res/drawable/ic_repeat_white_24dp.xml rename to app/src/main/res/drawable/ic_repeat.xml diff --git a/app/src/main/res/drawable/ic_replay_white_24dp.xml b/app/src/main/res/drawable/ic_replay.xml similarity index 100% rename from app/src/main/res/drawable/ic_replay_white_24dp.xml rename to app/src/main/res/drawable/ic_replay.xml diff --git a/app/src/main/res/drawable/ic_restaurant_black_24dp.xml b/app/src/main/res/drawable/ic_restaurant.xml similarity index 100% rename from app/src/main/res/drawable/ic_restaurant_black_24dp.xml rename to app/src/main/res/drawable/ic_restaurant.xml diff --git a/app/src/main/res/drawable/ic_rss_feed_black_24dp.xml b/app/src/main/res/drawable/ic_rss_feed.xml similarity index 100% rename from app/src/main/res/drawable/ic_rss_feed_black_24dp.xml rename to app/src/main/res/drawable/ic_rss_feed.xml diff --git a/app/src/main/res/drawable/ic_save_black_24dp.xml b/app/src/main/res/drawable/ic_save.xml similarity index 100% rename from app/src/main/res/drawable/ic_save_black_24dp.xml rename to app/src/main/res/drawable/ic_save.xml diff --git a/app/src/main/res/drawable/ic_school_black_24dp.xml b/app/src/main/res/drawable/ic_school.xml similarity index 100% rename from app/src/main/res/drawable/ic_school_black_24dp.xml rename to app/src/main/res/drawable/ic_school.xml diff --git a/app/src/main/res/drawable/ic_screen_rotation_white_24dp.xml b/app/src/main/res/drawable/ic_screen_rotation.xml similarity index 100% rename from app/src/main/res/drawable/ic_screen_rotation_white_24dp.xml rename to app/src/main/res/drawable/ic_screen_rotation.xml diff --git a/app/src/main/res/drawable/ic_search_black_24dp.xml b/app/src/main/res/drawable/ic_search.xml similarity index 100% rename from app/src/main/res/drawable/ic_search_black_24dp.xml rename to app/src/main/res/drawable/ic_search.xml diff --git a/app/src/main/res/drawable/ic_search_add_black_24dp.xml b/app/src/main/res/drawable/ic_search_add.xml similarity index 100% rename from app/src/main/res/drawable/ic_search_add_black_24dp.xml rename to app/src/main/res/drawable/ic_search_add.xml diff --git a/app/src/main/res/drawable/ic_settings_black_24dp.xml b/app/src/main/res/drawable/ic_settings.xml similarity index 100% rename from app/src/main/res/drawable/ic_settings_black_24dp.xml rename to app/src/main/res/drawable/ic_settings.xml diff --git a/app/src/main/res/drawable/ic_settings_backup_restore_white_24dp.xml b/app/src/main/res/drawable/ic_settings_backup_restore.xml similarity index 100% rename from app/src/main/res/drawable/ic_settings_backup_restore_white_24dp.xml rename to app/src/main/res/drawable/ic_settings_backup_restore.xml diff --git a/app/src/main/res/drawable/ic_settings_backup_restore_black_24dp.xml b/app/src/main/res/drawable/ic_settings_backup_restore_black_24dp.xml deleted file mode 100644 index 57f966536..000000000 --- a/app/src/main/res/drawable/ic_settings_backup_restore_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_share_black_24dp.xml b/app/src/main/res/drawable/ic_share.xml similarity index 100% rename from app/src/main/res/drawable/ic_share_black_24dp.xml rename to app/src/main/res/drawable/ic_share.xml diff --git a/app/src/main/res/drawable/ic_shopping_cart_black_24dp.xml b/app/src/main/res/drawable/ic_shopping_cart.xml similarity index 100% rename from app/src/main/res/drawable/ic_shopping_cart_black_24dp.xml rename to app/src/main/res/drawable/ic_shopping_cart.xml diff --git a/app/src/main/res/drawable/ic_shuffle_white_24dp.xml b/app/src/main/res/drawable/ic_shuffle.xml similarity index 100% rename from app/src/main/res/drawable/ic_shuffle_white_24dp.xml rename to app/src/main/res/drawable/ic_shuffle.xml diff --git a/app/src/main/res/drawable/ic_sort_black_24dp.xml b/app/src/main/res/drawable/ic_sort.xml similarity index 100% rename from app/src/main/res/drawable/ic_sort_black_24dp.xml rename to app/src/main/res/drawable/ic_sort.xml diff --git a/app/src/main/res/drawable/ic_stars_black_24dp.xml b/app/src/main/res/drawable/ic_stars.xml similarity index 100% rename from app/src/main/res/drawable/ic_stars_black_24dp.xml rename to app/src/main/res/drawable/ic_stars.xml diff --git a/app/src/main/res/drawable/ic_subtitles_white_24dp.xml b/app/src/main/res/drawable/ic_subtitles.xml similarity index 100% rename from app/src/main/res/drawable/ic_subtitles_white_24dp.xml rename to app/src/main/res/drawable/ic_subtitles.xml diff --git a/app/src/main/res/drawable/ic_telescope_black_24dp.xml b/app/src/main/res/drawable/ic_telescope.xml similarity index 100% rename from app/src/main/res/drawable/ic_telescope_black_24dp.xml rename to app/src/main/res/drawable/ic_telescope.xml diff --git a/app/src/main/res/drawable/ic_thumb_down_black_24dp.xml b/app/src/main/res/drawable/ic_thumb_down.xml similarity index 100% rename from app/src/main/res/drawable/ic_thumb_down_black_24dp.xml rename to app/src/main/res/drawable/ic_thumb_down.xml diff --git a/app/src/main/res/drawable/ic_thumb_up_black_24dp.xml b/app/src/main/res/drawable/ic_thumb_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_thumb_up_black_24dp.xml rename to app/src/main/res/drawable/ic_thumb_up.xml diff --git a/app/src/main/res/drawable/ic_trending_up_black_24dp.xml b/app/src/main/res/drawable/ic_trending_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_trending_up_black_24dp.xml rename to app/src/main/res/drawable/ic_trending_up.xml diff --git a/app/src/main/res/drawable/ic_tv_black_24dp.xml b/app/src/main/res/drawable/ic_tv.xml similarity index 100% rename from app/src/main/res/drawable/ic_tv_black_24dp.xml rename to app/src/main/res/drawable/ic_tv.xml diff --git a/app/src/main/res/drawable/ic_videogame_asset_black_24dp.xml b/app/src/main/res/drawable/ic_videogame_asset.xml similarity index 100% rename from app/src/main/res/drawable/ic_videogame_asset_black_24dp.xml rename to app/src/main/res/drawable/ic_videogame_asset.xml diff --git a/app/src/main/res/drawable/ic_volume_down_white_24dp.xml b/app/src/main/res/drawable/ic_volume_down.xml similarity index 100% rename from app/src/main/res/drawable/ic_volume_down_white_24dp.xml rename to app/src/main/res/drawable/ic_volume_down.xml diff --git a/app/src/main/res/drawable/ic_volume_mute_white_24dp.xml b/app/src/main/res/drawable/ic_volume_mute.xml similarity index 100% rename from app/src/main/res/drawable/ic_volume_mute_white_24dp.xml rename to app/src/main/res/drawable/ic_volume_mute.xml diff --git a/app/src/main/res/drawable/ic_volume_off_white_24dp.xml b/app/src/main/res/drawable/ic_volume_off.xml similarity index 98% rename from app/src/main/res/drawable/ic_volume_off_white_24dp.xml rename to app/src/main/res/drawable/ic_volume_off.xml index 2f8d6cfb4..7700239a3 100644 --- a/app/src/main/res/drawable/ic_volume_off_white_24dp.xml +++ b/app/src/main/res/drawable/ic_volume_off.xml @@ -7,4 +7,4 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_volume_up_black_24dp.xml b/app/src/main/res/drawable/ic_volume_up.xml similarity index 100% rename from app/src/main/res/drawable/ic_volume_up_black_24dp.xml rename to app/src/main/res/drawable/ic_volume_up.xml diff --git a/app/src/main/res/drawable/ic_watch_later_black_24dp.xml b/app/src/main/res/drawable/ic_watch_later.xml similarity index 100% rename from app/src/main/res/drawable/ic_watch_later_black_24dp.xml rename to app/src/main/res/drawable/ic_watch_later.xml diff --git a/app/src/main/res/drawable/ic_wb_sunny_black_24dp.xml b/app/src/main/res/drawable/ic_wb_sunny.xml similarity index 100% rename from app/src/main/res/drawable/ic_wb_sunny_black_24dp.xml rename to app/src/main/res/drawable/ic_wb_sunny.xml diff --git a/app/src/main/res/drawable/ic_whatshot_black_24dp.xml b/app/src/main/res/drawable/ic_whatshot.xml similarity index 100% rename from app/src/main/res/drawable/ic_whatshot_black_24dp.xml rename to app/src/main/res/drawable/ic_whatshot.xml diff --git a/app/src/main/res/drawable/ic_work_black_24dp.xml b/app/src/main/res/drawable/ic_work.xml similarity index 100% rename from app/src/main/res/drawable/ic_work_black_24dp.xml rename to app/src/main/res/drawable/ic_work.xml diff --git a/app/src/main/res/drawable/splash_background.xml b/app/src/main/res/drawable/splash_background.xml index 61c3d058f..c9b018add 100644 --- a/app/src/main/res/drawable/splash_background.xml +++ b/app/src/main/res/drawable/splash_background.xml @@ -1,6 +1,12 @@ - + - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_player_queue_control.xml b/app/src/main/res/layout-land/activity_player_queue_control.xml index b106e7437..4b79d92f6 100644 --- a/app/src/main/res/layout-land/activity_player_queue_control.xml +++ b/app/src/main/res/layout-land/activity_player_queue_control.xml @@ -12,8 +12,8 @@ android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:theme="@style/ThemeOverlay.AppCompat.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.ActionBar"> + android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar"> @@ -138,7 +139,7 @@ android:focusable="true" android:scaleType="fitCenter" android:tint="?attr/colorAccent" - app:srcCompat="@drawable/ic_pause_white_24dp" + app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> @@ -263,7 +264,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:background="@drawable/player_controls_background" android:gravity="center" android:orientation="horizontal" android:paddingLeft="16dp" diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index b8869862a..d4f1ccc3d 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -199,7 +199,7 @@ android:layout_gravity="top|end" android:layout_marginTop="11dp" android:layout_marginEnd="10dp" - app:srcCompat="@drawable/ic_expand_more_white_24dp" + app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription" /> @@ -333,7 +333,7 @@ android:text="@string/rss_button_title" android:textSize="12sp" android:theme="@style/RedButton" - app:drawableLeftCompat="@drawable/ic_rss_feed_white_24dp" + app:drawableLeftCompat="@drawable/ic_rss_feed" tools:ignore="RtlHardcoded" android:visibility="gone"/>--> @@ -367,7 +367,7 @@ android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" android:contentDescription="@string/detail_likes_img_view_description" - app:srcCompat="?attr/ic_thumb_up" /> + app:srcCompat="@drawable/ic_thumb_up" /> + app:drawableTopCompat="@drawable/ic_playlist_add" /> + app:drawableTopCompat="@drawable/ic_headset" /> + app:drawableTopCompat="@drawable/ic_picture_in_picture" /> + app:drawableTopCompat="@drawable/ic_file_download" /> @@ -529,7 +529,7 @@ android:paddingVertical="@dimen/detail_control_padding" android:text="@string/share" android:textSize="@dimen/detail_control_text_size" - app:drawableTopCompat="?attr/ic_share" /> + app:drawableTopCompat="@drawable/ic_share" /> + app:drawableTopCompat="@drawable/ic_language" /> + app:drawableTopCompat="@drawable/ic_cast" /> @@ -605,6 +605,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|center" + app:tabIndicatorGravity="top" app:tabIconTint="?attr/colorAccent" app:tabBackground="?attr/windowBackground" app:tabGravity="fill" @@ -703,7 +704,7 @@ android:scaleType="center" android:focusable="true" android:focusedByDefault="true" - app:srcCompat="?attr/ic_play_arrow" + app:srcCompat="@drawable/ic_play_arrow" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout-large-land/player.xml b/app/src/main/res/layout-large-land/player.xml index 07f3ae755..de15b9da9 100644 --- a/app/src/main/res/layout-large-land/player.xml +++ b/app/src/main/res/layout-large-land/player.xml @@ -5,7 +5,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/black" - android:gravity="center"> + android:gravity="center" + android:theme="@style/WhiteTintTheme"> @@ -205,7 +208,8 @@ android:paddingBottom="3dp" android:scaleType="fitCenter" android:visibility="gone" - app:srcCompat="@drawable/ic_format_list_numbered_white_24" + app:tint="@color/white" + app:srcCompat="@drawable/ic_format_list_numbered" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -218,7 +222,8 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_expand_more_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -282,7 +287,8 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_cast_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_cast" tools:ignore="RtlHardcoded" /> @@ -415,7 +425,8 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" - app:srcCompat="@drawable/ic_fullscreen_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -438,7 +449,8 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_previous_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_previous" tools:ignore="ContentDescription" /> @@ -449,7 +461,8 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_pause_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> @@ -474,7 +488,7 @@ android:layout_width="380dp" android:layout_height="match_parent" android:layout_alignParentEnd="true" - android:background="?attr/queue_background_color" + android:background="@color/queue_background_color" android:visibility="gone" tools:visibility="visible"> @@ -514,7 +528,8 @@ android:focusable="true" android:padding="10dp" android:scaleType="fitXY" - app:srcCompat="?attr/ic_close" /> + app:tint="@color/white" + app:srcCompat="@drawable/ic_close" /> @@ -556,6 +571,7 @@ android:layout_height="match_parent" android:layout_below="@id/itemsListControl" android:scrollbars="vertical" + android:theme="@style/PlayQueueItemTextTheme" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" tools:listitem="@layout/play_queue_item" /> @@ -580,7 +596,7 @@ android:padding="15dp" android:visibility="gone" tools:ignore="ContentDescription" - tools:src="@drawable/ic_fast_rewind_white_24dp" + tools:src="@drawable/ic_fast_rewind" tools:visibility="visible" /> @@ -629,7 +645,7 @@ android:layout_height="70dp" android:layout_centerInParent="true" tools:ignore="ContentDescription" - tools:src="@drawable/ic_volume_up_white_24dp" /> + tools:src="@drawable/ic_volume_up" /> + tools:src="@drawable/ic_brightness_high" /> + android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar"> + android:layout_height="wrap_content" + app:tabTextColor="@color/white" + app:tabIndicatorColor="@color/white" /> diff --git a/app/src/main/res/layout/activity_player_queue_control.xml b/app/src/main/res/layout/activity_player_queue_control.xml index c7c86a069..ec47992bb 100644 --- a/app/src/main/res/layout/activity_player_queue_control.xml +++ b/app/src/main/res/layout/activity_player_queue_control.xml @@ -12,8 +12,8 @@ android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:theme="@style/ThemeOverlay.AppCompat.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.ActionBar"> + android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar"> @@ -104,7 +105,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:background="@drawable/player_controls_background" android:gravity="center" android:orientation="horizontal" android:paddingLeft="12dp" @@ -180,7 +180,7 @@ android:focusable="true" android:scaleType="fitXY" android:tint="?attr/colorAccent" - app:srcCompat="@drawable/ic_repeat_white_24dp" + app:srcCompat="@drawable/ic_repeat" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout/activity_recaptcha.xml b/app/src/main/res/layout/activity_recaptcha.xml index 65428d9f1..12339d119 100644 --- a/app/src/main/res/layout/activity_recaptcha.xml +++ b/app/src/main/res/layout/activity_recaptcha.xml @@ -11,10 +11,7 @@ android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:gravity="center_vertical" - android:minHeight="?attr/actionBarSize" - android:theme="@style/ThemeOverlay.AppCompat.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.ActionBar" - app:titleTextAppearance="@style/Toolbar.Title" /> + android:minHeight="?attr/actionBarSize" /> + tools:src="@drawable/ic_asterisk" /> + android:theme="@style/ContrastToolbarTheme"> diff --git a/app/src/main/res/layout/dialog_playlists.xml b/app/src/main/res/layout/dialog_playlists.xml index 77b884f4f..7564296b3 100644 --- a/app/src/main/res/layout/dialog_playlists.xml +++ b/app/src/main/res/layout/dialog_playlists.xml @@ -20,7 +20,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="12dp" android:layout_marginRight="12dp" - app:srcCompat="?attr/ic_playlist_add" + app:srcCompat="@drawable/ic_playlist_add" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/feed_group_add_new_item.xml b/app/src/main/res/layout/feed_group_add_new_item.xml index 14ee19ad4..882b38870 100644 --- a/app/src/main/res/layout/feed_group_add_new_item.xml +++ b/app/src/main/res/layout/feed_group_add_new_item.xml @@ -24,7 +24,7 @@ android:layout_height="14dp" android:layout_gravity="center" android:scaleType="centerInside" - app:srcCompat="?attr/ic_add" + app:srcCompat="@drawable/ic_add" tools:ignore="ContentDescription" /> + tools:src="@drawable/ic_fastfood" /> + tools:src="@drawable/ic_kiosk_hot" /> \ No newline at end of file diff --git a/app/src/main/res/layout/feed_import_export_group.xml b/app/src/main/res/layout/feed_import_export_group.xml index 33d50f593..4a0b46692 100644 --- a/app/src/main/res/layout/feed_import_export_group.xml +++ b/app/src/main/res/layout/feed_import_export_group.xml @@ -53,7 +53,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_marginRight="16dp" - app:srcCompat="?attr/ic_expand_more" + app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/fragment_choose_tabs.xml b/app/src/main/res/layout/fragment_choose_tabs.xml index b41066226..ac6a0f4e5 100644 --- a/app/src/main/res/layout/fragment_choose_tabs.xml +++ b/app/src/main/res/layout/fragment_choose_tabs.xml @@ -26,6 +26,6 @@ android:focusable="true" app:backgroundTint="?attr/colorPrimary" app:fabSize="auto" - app:srcCompat="?attr/ic_add" /> + app:srcCompat="@drawable/ic_add" /> diff --git a/app/src/main/res/layout/fragment_feed.xml b/app/src/main/res/layout/fragment_feed.xml index b68c29bc6..756f49031 100644 --- a/app/src/main/res/layout/fragment_feed.xml +++ b/app/src/main/res/layout/fragment_feed.xml @@ -57,7 +57,7 @@ android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:layout_marginEnd="12dp" - app:srcCompat="?attr/ic_refresh" + app:srcCompat="@drawable/ic_refresh" tools:ignore="ContentDescription" /> + app:srcCompat="@drawable/ic_add" /> diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 6087e2b2d..ac39fc0f9 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -11,6 +11,9 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="?attr/colorPrimary" + app:tabRippleColor="@color/white" + app:tabIconTint="@color/white" + app:tabIndicatorColor="@color/white" app:tabGravity="fill" app:tabMinWidth="60dp" /> diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 28d30ebe8..0b10addf4 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -187,7 +187,7 @@ android:layout_gravity="top|end" android:layout_marginTop="11dp" android:layout_marginEnd="10dp" - app:srcCompat="@drawable/ic_expand_more_white_24dp" + app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription" /> @@ -321,7 +321,7 @@ android:text="@string/rss_button_title" android:textSize="12sp" android:theme="@style/RedButton" - app:drawableLeftCompat="@drawable/ic_rss_feed_white_24dp" + app:drawableLeftCompat="@drawable/ic_rss_feed" tools:ignore="RtlHardcoded" android:visibility="gone"/>--> @@ -355,7 +355,7 @@ android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" android:contentDescription="@string/detail_likes_img_view_description" - app:srcCompat="?attr/ic_thumb_up" /> + app:srcCompat="@drawable/ic_thumb_up" /> + app:drawableTopCompat="@drawable/ic_playlist_add" /> + app:drawableTopCompat="@drawable/ic_headset" /> + app:drawableTopCompat="@drawable/ic_picture_in_picture" /> + app:drawableTopCompat="@drawable/ic_file_download" /> @@ -513,7 +513,7 @@ android:paddingVertical="@dimen/detail_control_padding" android:text="@string/share" android:textSize="@dimen/detail_control_text_size" - app:drawableTopCompat="?attr/ic_share" /> + app:drawableTopCompat="@drawable/ic_share" /> + app:drawableTopCompat="@drawable/ic_language" /> + app:drawableTopCompat="@drawable/ic_cast" /> @@ -589,6 +589,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|center" + app:tabIndicatorGravity="top" app:tabIconTint="?attr/colorAccent" app:tabBackground="?attr/windowBackground" app:tabGravity="fill" @@ -601,7 +602,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:alpha="0.9" - android:background="?attr/windowBackground"> + android:background="?attr/windowBackground" + android:theme="@style/ContrastTintTheme"> diff --git a/app/src/main/res/layout/header_with_menu_item.xml b/app/src/main/res/layout/header_with_menu_item.xml index 580e8db4d..1a85b5945 100644 --- a/app/src/main/res/layout/header_with_menu_item.xml +++ b/app/src/main/res/layout/header_with_menu_item.xml @@ -28,5 +28,5 @@ android:layout_height="24dp" android:layout_marginStart="16dp" android:background="?attr/selectableItemBackgroundBorderless" - tools:src="?attr/ic_bookmark" /> + tools:src="@drawable/ic_bookmark" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_instance.xml b/app/src/main/res/layout/item_instance.xml index 534dc0ca4..b4ddfa6c1 100644 --- a/app/src/main/res/layout/item_instance.xml +++ b/app/src/main/res/layout/item_instance.xml @@ -76,7 +76,7 @@ android:paddingTop="12dp" android:paddingRight="10dp" android:paddingBottom="12dp" - app:srcCompat="?attr/ic_drag_handle" + app:srcCompat="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/item_search_suggestion.xml b/app/src/main/res/layout/item_search_suggestion.xml index 8d2a226d9..4b1025fea 100644 --- a/app/src/main/res/layout/item_search_suggestion.xml +++ b/app/src/main/res/layout/item_search_suggestion.xml @@ -4,7 +4,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal"> + android:orientation="horizontal" + android:theme="@style/ContrastTintTheme"> + tools:src="@drawable/ic_history" /> diff --git a/app/src/main/res/layout/item_stream_segment.xml b/app/src/main/res/layout/item_stream_segment.xml index 7ae66bc70..a9eba0e85 100644 --- a/app/src/main/res/layout/item_stream_segment.xml +++ b/app/src/main/res/layout/item_stream_segment.xml @@ -42,7 +42,7 @@ android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="2" - android:textAppearance="?android:attr/textAppearanceLarge" + android:textAppearance="@style/PlayQueueItemTitle" android:textSize="@dimen/video_item_search_title_text_size" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" @@ -53,7 +53,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" - android:textAppearance="?android:attr/textAppearanceSmall" + android:textAppearance="@style/PlayQueueItemSubtitle" android:textSize="@dimen/video_item_search_upload_date_text_size" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/textViewTitle" diff --git a/app/src/main/res/layout/list_choose_tabs.xml b/app/src/main/res/layout/list_choose_tabs.xml index a385f64a8..7110895f0 100644 --- a/app/src/main/res/layout/list_choose_tabs.xml +++ b/app/src/main/res/layout/list_choose_tabs.xml @@ -28,7 +28,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="16dp" tools:ignore="ContentDescription,RtlHardcoded" - tools:src="?attr/ic_kiosk_hot" /> + tools:src="@drawable/ic_kiosk_hot" /> diff --git a/app/src/main/res/layout/list_choose_tabs_dialog.xml b/app/src/main/res/layout/list_choose_tabs_dialog.xml index 1fd917d1e..82183e18c 100644 --- a/app/src/main/res/layout/list_choose_tabs_dialog.xml +++ b/app/src/main/res/layout/list_choose_tabs_dialog.xml @@ -14,7 +14,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="?dialogPreferredPadding" tools:ignore="ContentDescription,RtlHardcoded" - tools:src="?attr/ic_kiosk_hot" /> + tools:src="@drawable/ic_kiosk_hot" /> + app:srcCompat="@drawable/ic_thumb_up" /> + app:srcCompat="@drawable/ic_thumb_up" /> diff --git a/app/src/main/res/layout/list_playlist_item.xml b/app/src/main/res/layout/list_playlist_item.xml index 61a6fca82..028a10a2e 100644 --- a/app/src/main/res/layout/list_playlist_item.xml +++ b/app/src/main/res/layout/list_playlist_item.xml @@ -38,7 +38,7 @@ android:textColor="@color/duration_text_color" android:textSize="@dimen/video_item_search_duration_text_size" android:textStyle="bold" - app:drawableTopCompat="@drawable/ic_playlist_play_white_24dp" + app:drawableTopCompat="@drawable/ic_playlist_play" tools:ignore="RtlHardcoded" tools:text="314159" /> diff --git a/app/src/main/res/layout/list_playlist_mini_item.xml b/app/src/main/res/layout/list_playlist_mini_item.xml index f31ef67f2..fcb7b5f3a 100644 --- a/app/src/main/res/layout/list_playlist_mini_item.xml +++ b/app/src/main/res/layout/list_playlist_mini_item.xml @@ -38,7 +38,7 @@ android:textColor="@color/duration_text_color" android:textSize="@dimen/video_item_search_duration_text_size" android:textStyle="bold" - app:drawableTopCompat="@drawable/ic_playlist_play_white_24dp" + app:drawableTopCompat="@drawable/ic_playlist_play" tools:ignore="RtlHardcoded" tools:text="3141" /> diff --git a/app/src/main/res/layout/list_radio_icon_item.xml b/app/src/main/res/layout/list_radio_icon_item.xml index abbd82a5c..46e7419ad 100644 --- a/app/src/main/res/layout/list_radio_icon_item.xml +++ b/app/src/main/res/layout/list_radio_icon_item.xml @@ -13,5 +13,5 @@ android:paddingStart="?attr/listPreferredItemPaddingLeft" android:paddingEnd="?attr/listPreferredItemPaddingRight" android:textColor="?attr/textColorAlertDialogListItem" - tools:drawableLeft="?attr/ic_play_arrow" + tools:drawableLeft="@drawable/ic_play_arrow" tools:text="Lorem ipsum dolor sit amet" /> diff --git a/app/src/main/res/layout/list_stream_playlist_grid_item.xml b/app/src/main/res/layout/list_stream_playlist_grid_item.xml index 75aef9a9e..53b30120a 100644 --- a/app/src/main/res/layout/list_stream_playlist_grid_item.xml +++ b/app/src/main/res/layout/list_stream_playlist_grid_item.xml @@ -50,7 +50,7 @@ android:contentDescription="@string/detail_drag_description" android:paddingLeft="@dimen/video_item_search_image_right_margin" android:scaleType="center" - app:srcCompat="?attr/ic_drag_handle" + app:srcCompat="@drawable/ic_drag_handle" tools:ignore="RtlHardcoded,RtlSymmetry" /> + app:srcCompat="@drawable/ic_more_vert" + app:tint="?attr/actionColor" /> @@ -52,7 +53,8 @@ android:contentDescription="TODO" android:gravity="center" android:padding="10dp" - android:scaleType="fitXY" /> + android:scaleType="fitXY" + app:tint="?attr/actionColor" /> + android:scaleType="fitXY" + app:tint="?attr/actionColor" /> + app:srcCompat="@drawable/ic_more_vert" + app:tint="?attr/actionColor" /> diff --git a/app/src/main/res/layout/missions_header.xml b/app/src/main/res/layout/missions_header.xml index 45c8b95b8..840986251 100644 --- a/app/src/main/res/layout/missions_header.xml +++ b/app/src/main/res/layout/missions_header.xml @@ -10,7 +10,6 @@ android:layout_marginRight="8dp" android:orientation="vertical"> - - - diff --git a/app/src/main/res/layout/picker_icon_item.xml b/app/src/main/res/layout/picker_icon_item.xml index f319f8c9a..ec040048d 100644 --- a/app/src/main/res/layout/picker_icon_item.xml +++ b/app/src/main/res/layout/picker_icon_item.xml @@ -11,4 +11,4 @@ android:padding="8dp" android:scaleType="centerInside" tools:ignore="ContentDescription" - tools:src="?attr/ic_rss" /> + tools:src="@drawable/ic_rss_feed" /> diff --git a/app/src/main/res/layout/picker_subscription_item.xml b/app/src/main/res/layout/picker_subscription_item.xml index 62f5b28ec..352ef4d62 100644 --- a/app/src/main/res/layout/picker_subscription_item.xml +++ b/app/src/main/res/layout/picker_subscription_item.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="2dp" - android:background="?attr/focused_selector" + android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"> @@ -42,7 +42,7 @@ android:id="@+id/selected_highlight" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#9A000000" + android:background="?attr/colorControlHighlight" android:visibility="gone" tools:visibility="visible"> @@ -52,7 +52,8 @@ android:layout_gravity="top|center_horizontal" android:layout_marginTop="4dp" android:scaleType="centerInside" - app:srcCompat="@drawable/ic_done_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_done" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout/play_queue_item.xml b/app/src/main/res/layout/play_queue_item.xml index 4364aa84d..a5be55c94 100644 --- a/app/src/main/res/layout/play_queue_item.xml +++ b/app/src/main/res/layout/play_queue_item.xml @@ -46,7 +46,7 @@ android:layout_gravity="center_vertical" android:padding="@dimen/video_item_search_image_right_margin" android:scaleType="center" - app:srcCompat="?attr/ic_drag_handle" + app:srcCompat="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> + android:gravity="center" + android:theme="@style/WhiteTintTheme"> @@ -281,7 +286,8 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_cast_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_cast" tools:ignore="RtlHardcoded" /> @@ -412,7 +422,8 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" - app:srcCompat="@drawable/ic_fullscreen_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -435,7 +446,8 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_previous_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_previous" tools:ignore="ContentDescription" /> @@ -446,7 +458,8 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_pause_white_24dp" + app:tint="@color/white" + app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> @@ -470,7 +484,7 @@ android:id="@+id/itemsListPanel" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/queue_background_color" + android:background="@color/queue_background_color" android:visibility="gone" tools:visibility="visible"> @@ -510,9 +524,10 @@ android:focusable="true" android:padding="10dp" android:scaleType="fitXY" - app:srcCompat="?attr/ic_close" /> + app:tint="@color/white" + app:srcCompat="@drawable/ic_close" /> - @@ -552,6 +567,7 @@ android:layout_height="match_parent" android:layout_below="@id/itemsListControl" android:scrollbars="vertical" + android:theme="@style/PlayQueueItemTextTheme" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" tools:listitem="@layout/play_queue_item" /> @@ -576,7 +592,7 @@ android:padding="15dp" android:visibility="gone" tools:ignore="ContentDescription" - tools:src="@drawable/ic_fast_rewind_white_24dp" + tools:src="@drawable/ic_fast_rewind" tools:visibility="visible" /> @@ -625,7 +641,7 @@ android:layout_height="70dp" android:layout_centerInParent="true" tools:ignore="ContentDescription" - tools:src="@drawable/ic_volume_up_white_24dp" /> + tools:src="@drawable/ic_volume_up" /> + tools:src="@drawable/ic_brightness" /> + app:srcCompat="@drawable/ic_close" /> diff --git a/app/src/main/res/layout/playlist_control.xml b/app/src/main/res/layout/playlist_control.xml index 82220ea5b..0b58f3715 100644 --- a/app/src/main/res/layout/playlist_control.xml +++ b/app/src/main/res/layout/playlist_control.xml @@ -27,8 +27,8 @@ android:text="@string/controls_background_title" android:textColor="?attr/colorAccent" android:textSize="@dimen/channel_rss_title_size" - app:drawableLeftCompat="?attr/ic_headset" - app:drawableStartCompat="?attr/ic_headset" /> + app:drawableLeftCompat="@drawable/ic_headset" + app:drawableStartCompat="@drawable/ic_headset" /> + app:drawableLeftCompat="@drawable/ic_picture_in_picture" + app:drawableStartCompat="@drawable/ic_picture_in_picture" /> diff --git a/app/src/main/res/layout/select_kiosk_item.xml b/app/src/main/res/layout/select_kiosk_item.xml index 69b7f0b52..6cd04ae34 100644 --- a/app/src/main/res/layout/select_kiosk_item.xml +++ b/app/src/main/res/layout/select_kiosk_item.xml @@ -1,5 +1,6 @@ + tools:src="@drawable/ic_previous" /> + android:theme="@style/ToolbarTheme"> diff --git a/app/src/main/res/menu/download_menu.xml b/app/src/main/res/menu/download_menu.xml index f28d3d074..c12a7e768 100644 --- a/app/src/main/res/menu/download_menu.xml +++ b/app/src/main/res/menu/download_menu.xml @@ -5,28 +5,28 @@ diff --git a/app/src/main/res/menu/error_menu.xml b/app/src/main/res/menu/error_menu.xml index d1dd8888c..1984c0490 100644 --- a/app/src/main/res/menu/error_menu.xml +++ b/app/src/main/res/menu/error_menu.xml @@ -4,7 +4,7 @@ diff --git a/app/src/main/res/menu/main_fragment_menu.xml b/app/src/main/res/menu/main_fragment_menu.xml index 0cc6ec1b0..fbe3b4e09 100644 --- a/app/src/main/res/menu/main_fragment_menu.xml +++ b/app/src/main/res/menu/main_fragment_menu.xml @@ -4,7 +4,7 @@ diff --git a/app/src/main/res/menu/menu_channel.xml b/app/src/main/res/menu/menu_channel.xml index 7e19d6d42..af9020626 100644 --- a/app/src/main/res/menu/menu_channel.xml +++ b/app/src/main/res/menu/menu_channel.xml @@ -5,7 +5,7 @@ diff --git a/app/src/main/res/menu/menu_feed_fragment.xml b/app/src/main/res/menu/menu_feed_fragment.xml index d96b382d0..31a521914 100644 --- a/app/src/main/res/menu/menu_feed_fragment.xml +++ b/app/src/main/res/menu/menu_feed_fragment.xml @@ -4,7 +4,7 @@ diff --git a/app/src/main/res/menu/menu_feed_group_dialog.xml b/app/src/main/res/menu/menu_feed_group_dialog.xml index 237faf41a..b0c1e494d 100644 --- a/app/src/main/res/menu/menu_feed_group_dialog.xml +++ b/app/src/main/res/menu/menu_feed_group_dialog.xml @@ -5,8 +5,9 @@ diff --git a/app/src/main/res/menu/menu_play_queue.xml b/app/src/main/res/menu/menu_play_queue.xml index 7eff18077..0efadcb66 100644 --- a/app/src/main/res/menu/menu_play_queue.xml +++ b/app/src/main/res/menu/menu_play_queue.xml @@ -5,7 +5,7 @@ @@ -20,7 +20,7 @@ diff --git a/app/src/main/res/menu/menu_playlist.xml b/app/src/main/res/menu/menu_playlist.xml index 9796dce68..8e3ea1559 100644 --- a/app/src/main/res/menu/menu_playlist.xml +++ b/app/src/main/res/menu/menu_playlist.xml @@ -5,13 +5,13 @@ diff --git a/app/src/main/res/menu/menu_search.xml b/app/src/main/res/menu/menu_search.xml index f9310dc07..74f093452 100644 --- a/app/src/main/res/menu/menu_search.xml +++ b/app/src/main/res/menu/menu_search.xml @@ -4,7 +4,7 @@ diff --git a/app/src/main/res/menu/video_detail_menu.xml b/app/src/main/res/menu/video_detail_menu.xml index 574fbc737..738ac8686 100644 --- a/app/src/main/res/menu/video_detail_menu.xml +++ b/app/src/main/res/menu/video_detail_menu.xml @@ -4,13 +4,13 @@ diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 000000000..7fec31302 --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,5 @@ + + + @color/black + @color/white + \ No newline at end of file diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml new file mode 100644 index 000000000..bdad22174 --- /dev/null +++ b/app/src/main/res/values-v21/styles.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + - - + + + + - - - - - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/release/res/xml/main_settings.xml b/app/src/release/res/xml/main_settings.xml index abb94f4ef..5a4f9b37f 100644 --- a/app/src/release/res/xml/main_settings.xml +++ b/app/src/release/res/xml/main_settings.xml @@ -6,43 +6,43 @@ diff --git a/app/src/test/java/org/schabi/newpipe/local/subscription/FeedGroupIconTest.kt b/app/src/test/java/org/schabi/newpipe/local/subscription/FeedGroupIconTest.kt index e6d4247ca..1479c3d1e 100644 --- a/app/src/test/java/org/schabi/newpipe/local/subscription/FeedGroupIconTest.kt +++ b/app/src/test/java/org/schabi/newpipe/local/subscription/FeedGroupIconTest.kt @@ -25,7 +25,7 @@ class FeedGroupIconTest { val usedIcons = HashSet() for (groupIcon in FeedGroupIcon.values()) { - val added = usedIcons.add(groupIcon.drawableResourceAttr) + val added = usedIcons.add(groupIcon.drawableResource) assertTrue("Repeated icon (current item: ${groupIcon.name} - ${groupIcon.id})", added) } }