diff --git a/README.md b/README.md
index 28be821929a..c47f8c2f4fb 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
Website • Blog • FAQ • Press
-*Read this in other languages: [English](README.md), [Español](doc/README.es.md), [한국어](doc/README.ko.md), [Soomaali](doc/README.so.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md).*
+*Read this in other languages: [English](README.md), [Español](doc/README.es.md), [हिन्दी](doc/README.hi.md), [한국어](doc/README.ko.md), [Soomaali](doc/README.so.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md).*
WARNING: THIS IS A BETA VERSION, THEREFORE YOU MAY ENCOUNTER BUGS. IF YOU DO, OPEN AN ISSUE VIA OUR GITHUB REPOSITORY.
diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
index adef3c0e4ba..22e84e93dfb 100644
--- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
@@ -72,6 +72,7 @@
import org.schabi.newpipe.util.DeviceUtils;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ListHelper;
+import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.ThemeHelper;
@@ -127,8 +128,10 @@ protected void onCreate(final Bundle savedInstanceState) {
}
}
+ ThemeHelper.setDayNightMode(this);
setTheme(ThemeHelper.isLightThemeSelected(this)
? R.style.RouterActivityThemeLight : R.style.RouterActivityThemeDark);
+ Localization.assureCorrectAppLanguage(this);
}
@Override
diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java
index ad1941adbd0..8d703301bdb 100644
--- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java
+++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java
@@ -51,7 +51,7 @@ public StreamHistoryEntity(final long streamUid, @NonNull final OffsetDateTime a
@Ignore
public StreamHistoryEntity(final long streamUid, @NonNull final OffsetDateTime accessDate) {
- this(streamUid, accessDate, 1);
+ this(streamUid, accessDate, 0); // start with 0 views (adding views will be done elsewhere)
}
public long getStreamUid() {
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
index 869503b5bed..fa8f5fdbd96 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
@@ -77,6 +77,8 @@ public class ChannelFragment extends BaseListInfoFragment dialog.show(getFM(), TAG)
+ ));
+ break;
default:
return super.onOptionsItemSelected(item);
}
diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java
index 0eb56d7169c..6023d4b10af 100644
--- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java
@@ -419,9 +419,11 @@ public void removeWatchedStreams(final boolean removePartiallyWatched) {
final PlaylistStreamEntry playlistItem = playlistIter.next();
final int indexInHistory = Collections.binarySearch(historyStreamIds,
playlistItem.getStreamId());
+ final StreamStateEntity streamStateEntity = streamStatesIter.next();
+ final long duration = playlistItem.toStreamInfoItem().getDuration();
- final boolean hasState = streamStatesIter.next() != null;
- if (indexInHistory < 0 || hasState) {
+ if (indexInHistory < 0 || (streamStateEntity != null
+ && !streamStateEntity.isFinished(duration))) {
notWatchedItems.add(playlistItem);
} else if (!thumbnailVideoRemoved
&& playlistManager.getPlaylistThumbnail(playlistId)
diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt
index 008228083ad..4295424e695 100644
--- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt
+++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt
@@ -1,24 +1,24 @@
package org.schabi.newpipe.local.subscription
import android.app.Activity
-import android.content.BroadcastReceiver
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
-import android.content.IntentFilter
import android.os.Bundle
import android.os.Parcelable
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
+import android.view.MenuItem
+import android.view.SubMenu
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.activity.result.ActivityResult
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
+import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.lifecycle.ViewModelProvider
-import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.recyclerview.widget.GridLayoutManager
import com.xwray.groupie.Group
import com.xwray.groupie.GroupAdapter
@@ -34,6 +34,7 @@ import org.schabi.newpipe.databinding.FeedItemCarouselBinding
import org.schabi.newpipe.databinding.FragmentSubscriptionBinding
import org.schabi.newpipe.error.ErrorInfo
import org.schabi.newpipe.error.UserAction
+import org.schabi.newpipe.extractor.ServiceList
import org.schabi.newpipe.extractor.channel.ChannelInfoItem
import org.schabi.newpipe.fragments.BaseStateFragment
import org.schabi.newpipe.ktx.animate
@@ -45,13 +46,10 @@ import org.schabi.newpipe.local.subscription.item.EmptyPlaceholderItem
import org.schabi.newpipe.local.subscription.item.FeedGroupAddItem
import org.schabi.newpipe.local.subscription.item.FeedGroupCardItem
import org.schabi.newpipe.local.subscription.item.FeedGroupCarouselItem
-import org.schabi.newpipe.local.subscription.item.FeedImportExportItem
import org.schabi.newpipe.local.subscription.item.HeaderWithMenuItem
import org.schabi.newpipe.local.subscription.item.HeaderWithMenuItem.Companion.PAYLOAD_UPDATE_VISIBILITY_MENU_ITEM
import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService
-import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService.EXPORT_COMPLETE_ACTION
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService
-import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.IMPORT_COMPLETE_ACTION
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_VALUE
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.PREVIOUS_EXPORT_MODE
@@ -59,6 +57,7 @@ import org.schabi.newpipe.streams.io.NoFileManagerSafeGuard
import org.schabi.newpipe.streams.io.StoredFileHelper
import org.schabi.newpipe.util.NavigationHelper
import org.schabi.newpipe.util.OnClickGesture
+import org.schabi.newpipe.util.ServiceHelper
import org.schabi.newpipe.util.ThemeHelper.getGridSpanCountChannels
import org.schabi.newpipe.util.ThemeHelper.shouldUseGridLayout
import org.schabi.newpipe.util.external_communication.ShareUtils
@@ -74,12 +73,9 @@ class SubscriptionFragment : BaseStateFragment() {
private lateinit var subscriptionManager: SubscriptionManager
private val disposables: CompositeDisposable = CompositeDisposable()
- private var subscriptionBroadcastReceiver: BroadcastReceiver? = null
-
private val groupAdapter = GroupAdapter>()
private val feedGroupsSection = Section()
private var feedGroupsCarousel: FeedGroupCarouselItem? = null
- private lateinit var importExportItem: FeedImportExportItem
private lateinit var feedGroupsSortMenuItem: HeaderWithMenuItem
private val subscriptionsSection = Section()
@@ -91,12 +87,10 @@ class SubscriptionFragment : BaseStateFragment() {
@State
@JvmField
var itemsListState: Parcelable? = null
+
@State
@JvmField
var feedGroupsListState: Parcelable? = null
- @State
- @JvmField
- var importExportItemExpandedState: Boolean? = null
init {
setHasOptionsMenu(true)
@@ -120,20 +114,10 @@ class SubscriptionFragment : BaseStateFragment() {
return inflater.inflate(R.layout.fragment_subscription, container, false)
}
- override fun onResume() {
- super.onResume()
- setupBroadcastReceiver()
- }
-
override fun onPause() {
super.onPause()
itemsListState = binding.itemsList.layoutManager?.onSaveInstanceState()
feedGroupsListState = feedGroupsCarousel?.onSaveInstanceState()
- importExportItemExpandedState = importExportItem.isExpanded
-
- if (subscriptionBroadcastReceiver != null && activity != null) {
- LocalBroadcastManager.getInstance(activity).unregisterReceiver(subscriptionBroadcastReceiver!!)
- }
}
override fun onDestroy() {
@@ -150,28 +134,61 @@ class SubscriptionFragment : BaseStateFragment() {
activity.supportActionBar?.setDisplayShowTitleEnabled(true)
activity.supportActionBar?.setTitle(R.string.tab_subscriptions)
+
+ buildImportExportMenu(menu)
}
- private fun setupBroadcastReceiver() {
- if (activity == null) return
+ private fun buildImportExportMenu(menu: Menu) {
+ // -- Import --
+ val importSubMenu = menu.addSubMenu(R.string.import_from)
- if (subscriptionBroadcastReceiver != null) {
- LocalBroadcastManager.getInstance(activity).unregisterReceiver(subscriptionBroadcastReceiver!!)
- }
+ addMenuItemToSubmenu(importSubMenu, R.string.previous_export) { onImportPreviousSelected() }
+ .setIcon(R.drawable.ic_backup)
- val filters = IntentFilter()
- filters.addAction(EXPORT_COMPLETE_ACTION)
- filters.addAction(IMPORT_COMPLETE_ACTION)
- subscriptionBroadcastReceiver = object : BroadcastReceiver() {
- override fun onReceive(context: Context, intent: Intent) {
- _binding?.itemsList?.post {
- importExportItem.isExpanded = false
- importExportItem.notifyChanged(FeedImportExportItem.REFRESH_EXPANDED_STATUS)
- }
+ for (service in ServiceList.all()) {
+ val subscriptionExtractor = service.subscriptionExtractor ?: continue
+
+ val supportedSources = subscriptionExtractor.supportedSources
+ if (supportedSources.isEmpty()) continue
+
+ addMenuItemToSubmenu(importSubMenu, service.serviceInfo.name) {
+ onImportFromServiceSelected(service.serviceId)
}
+ .setIcon(ServiceHelper.getIcon(service.serviceId))
}
- LocalBroadcastManager.getInstance(activity).registerReceiver(subscriptionBroadcastReceiver!!, filters)
+ // -- Export --
+ val exportSubMenu = menu.addSubMenu(R.string.export_to)
+
+ addMenuItemToSubmenu(exportSubMenu, R.string.file) { onExportSelected() }
+ .setIcon(R.drawable.ic_save)
+ }
+
+ private fun addMenuItemToSubmenu(
+ subMenu: SubMenu,
+ @StringRes title: Int,
+ onClick: Runnable
+ ): MenuItem {
+ return setClickListenerToMenuItem(subMenu.add(title), onClick)
+ }
+
+ private fun addMenuItemToSubmenu(
+ subMenu: SubMenu,
+ title: String,
+ onClick: Runnable
+ ): MenuItem {
+ return setClickListenerToMenuItem(subMenu.add(title), onClick)
+ }
+
+ private fun setClickListenerToMenuItem(
+ menuItem: MenuItem,
+ onClick: Runnable
+ ): MenuItem {
+ menuItem.setOnMenuItemClickListener { _ ->
+ onClick.run()
+ true
+ }
+ return menuItem
}
private fun onImportFromServiceSelected(serviceId: Int) {
@@ -263,13 +280,14 @@ class SubscriptionFragment : BaseStateFragment() {
subscriptionsSection.setPlaceholder(EmptyPlaceholderItem())
subscriptionsSection.setHideWhenEmpty(true)
- importExportItem = FeedImportExportItem(
- { onImportPreviousSelected() },
- { onImportFromServiceSelected(it) },
- { onExportSelected() },
- importExportItemExpandedState ?: false
+ groupAdapter.add(
+ Section(
+ HeaderWithMenuItem(
+ getString(R.string.tab_subscriptions)
+ ),
+ listOf(subscriptionsSection)
+ )
)
- groupAdapter.add(Section(importExportItem, listOf(subscriptionsSection)))
}
override fun initViews(rootView: View, savedInstanceState: Bundle?) {
@@ -371,13 +389,6 @@ class SubscriptionFragment : BaseStateFragment() {
subscriptionsSection.update(result.subscriptions)
subscriptionsSection.setHideWhenEmpty(false)
- if (result.subscriptions.isEmpty() && importExportItemExpandedState == null) {
- binding.itemsList.post {
- importExportItem.isExpanded = true
- importExportItem.notifyChanged(FeedImportExportItem.REFRESH_EXPANDED_STATUS)
- }
- }
-
if (itemsListState != null) {
binding.itemsList.layoutManager?.onRestoreInstanceState(itemsListState)
itemsListState = null
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
deleted file mode 100644
index aacfc77adc4..00000000000
--- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.schabi.newpipe.local.subscription.item
-
-import android.graphics.Color
-import android.graphics.PorterDuff
-import android.view.View
-import android.view.ViewGroup
-import android.widget.ImageView
-import android.widget.TextView
-import androidx.annotation.DrawableRes
-import com.xwray.groupie.viewbinding.BindableItem
-import com.xwray.groupie.viewbinding.GroupieViewHolder
-import org.schabi.newpipe.R
-import org.schabi.newpipe.databinding.FeedImportExportGroupBinding
-import org.schabi.newpipe.extractor.NewPipe
-import org.schabi.newpipe.extractor.exceptions.ExtractionException
-import org.schabi.newpipe.ktx.animateRotation
-import org.schabi.newpipe.util.ServiceHelper
-import org.schabi.newpipe.util.ThemeHelper
-import org.schabi.newpipe.views.CollapsibleView
-
-class FeedImportExportItem(
- val onImportPreviousSelected: () -> Unit,
- val onImportFromServiceSelected: (Int) -> Unit,
- val onExportSelected: () -> Unit,
- var isExpanded: Boolean = false
-) : BindableItem() {
- companion object {
- const val REFRESH_EXPANDED_STATUS = 123
- }
-
- override fun bind(viewBinding: FeedImportExportGroupBinding, position: Int, payloads: MutableList) {
- if (payloads.contains(REFRESH_EXPANDED_STATUS)) {
- viewBinding.importExportOptions.apply { if (isExpanded) expand() else collapse() }
- return
- }
-
- super.bind(viewBinding, position, payloads)
- }
-
- override fun getLayout(): Int = R.layout.feed_import_export_group
-
- override fun bind(viewBinding: FeedImportExportGroupBinding, position: Int) {
- if (viewBinding.importFromOptions.childCount == 0) setupImportFromItems(viewBinding.importFromOptions)
- if (viewBinding.exportToOptions.childCount == 0) setupExportToItems(viewBinding.exportToOptions)
-
- expandIconListener?.let { viewBinding.importExportOptions.removeListener(it) }
- expandIconListener = CollapsibleView.StateListener { newState ->
- viewBinding.importExportExpandIcon.animateRotation(
- 250, if (newState == CollapsibleView.COLLAPSED) 0 else 180
- )
- }
-
- viewBinding.importExportOptions.currentState = if (isExpanded) CollapsibleView.EXPANDED else CollapsibleView.COLLAPSED
- viewBinding.importExportExpandIcon.rotation = if (isExpanded) 180F else 0F
- viewBinding.importExportOptions.ready()
-
- viewBinding.importExportOptions.addListener(expandIconListener)
- viewBinding.importExport.setOnClickListener {
- viewBinding.importExportOptions.switchState()
- isExpanded = viewBinding.importExportOptions.currentState == CollapsibleView.EXPANDED
- }
- }
-
- override fun unbind(viewHolder: GroupieViewHolder) {
- super.unbind(viewHolder)
- expandIconListener?.let { viewHolder.binding.importExportOptions.removeListener(it) }
- expandIconListener = null
- }
-
- override fun initializeViewBinding(view: View) = FeedImportExportGroupBinding.bind(view)
-
- private var expandIconListener: CollapsibleView.StateListener? = null
-
- private fun addItemView(title: String, @DrawableRes icon: Int, container: ViewGroup): View {
- val itemRoot = View.inflate(container.context, R.layout.subscription_import_export_item, null)
- val titleView = itemRoot.findViewById(android.R.id.text1)
- val iconView = itemRoot.findViewById(android.R.id.icon1)
-
- titleView.text = title
- iconView.setImageResource(icon)
-
- container.addView(itemRoot)
- return itemRoot
- }
-
- private fun setupImportFromItems(listHolder: ViewGroup) {
- val previousBackupItem = addItemView(
- listHolder.context.getString(R.string.previous_export),
- R.drawable.ic_backup, listHolder
- )
- previousBackupItem.setOnClickListener { onImportPreviousSelected() }
-
- val iconColor = if (ThemeHelper.isLightThemeSelected(listHolder.context)) Color.BLACK else Color.WHITE
- val services = listHolder.context.resources.getStringArray(R.array.service_list)
- for (serviceName in services) {
- try {
- val service = NewPipe.getService(serviceName)
-
- val subscriptionExtractor = service.subscriptionExtractor ?: continue
-
- val supportedSources = subscriptionExtractor.supportedSources
- if (supportedSources.isEmpty()) continue
-
- val itemView = addItemView(serviceName, ServiceHelper.getIcon(service.serviceId), listHolder)
- val iconView = itemView.findViewById(android.R.id.icon1)
- iconView.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
-
- itemView.setOnClickListener { onImportFromServiceSelected(service.serviceId) }
- } catch (e: ExtractionException) {
- throw RuntimeException("Services array contains an entry that it's not a valid service name ($serviceName)", e)
- }
- }
- }
-
- private fun setupExportToItems(listHolder: ViewGroup) {
- val previousBackupItem = addItemView(
- listHolder.context.getString(R.string.file),
- R.drawable.ic_save, listHolder
- )
- previousBackupItem.setOnClickListener { onExportSelected() }
- }
-}
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 794fe9b3ce5..a7fb40c47af 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
@@ -126,6 +126,14 @@ public void onScroll(@NonNull final MainPlayer.PlayerType playerType,
}
private void onScrollMainVolume(final float distanceX, final float distanceY) {
+ // If we just started sliding, change the progress bar to match the system volume
+ if (player.getVolumeRelativeLayout().getVisibility() != View.VISIBLE) {
+ final float volumePercent = player
+ .getAudioReactor().getVolume() / (float) maxVolume;
+ player.getVolumeProgressBar().setProgress(
+ (int) (volumePercent * player.getMaxGestureLength()));
+ }
+
player.getVolumeProgressBar().incrementProgressBy((int) distanceY);
final float currentProgressPercent = (float) player
.getVolumeProgressBar().getProgress() / player.getMaxGestureLength();
diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java
index c12ba754ad4..a8735dc08bc 100644
--- a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java
+++ b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java
@@ -13,6 +13,7 @@
import androidx.annotation.Nullable;
import androidx.media.session.MediaButtonReceiver;
+import com.google.android.exoplayer2.ForwardingPlayer;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector;
@@ -55,7 +56,17 @@ public MediaSessionManager(@NonNull final Context context,
sessionConnector = new MediaSessionConnector(mediaSession);
sessionConnector.setQueueNavigator(new PlayQueueNavigator(mediaSession, callback));
- sessionConnector.setPlayer(player);
+ sessionConnector.setPlayer(new ForwardingPlayer(player) {
+ @Override
+ public void play() {
+ callback.play();
+ }
+
+ @Override
+ public void pause() {
+ callback.pause();
+ }
+ });
}
@Nullable
diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
index 7220335d182..19a5a645bbe 100644
--- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
+++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java
@@ -213,7 +213,7 @@ private void initUI() {
getPitchControlModeComponentMappings()
.forEach(this::setupPitchControlModeTextView);
- changePitchControlMode(isCurrentPitchControlModeSemitone());
+ // Initialization is done at the end
// Pitch - Percent
setText(binding.pitchPercentMinimumText, PlayerHelper::formatPitch, MIN_PITCH_OR_SPEED);
@@ -275,6 +275,9 @@ private void initUI() {
skipSilence = isChecked;
updateCallback();
});
+
+ // PitchControlMode has to be initialized at the end because it requires the unhookCheckbox
+ changePitchControlMode(isCurrentPitchControlModeSemitone());
}
// -- General formatting --
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 c7eb0be40fb..1ff7947fd74 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java
@@ -207,7 +207,7 @@ private void showAddItemDialog(final Context c) {
new AlertDialog.Builder(c)
.setTitle(R.string.peertube_instance_add_title)
- .setIcon(R.drawable.place_holder_peertube)
+ .setIcon(R.drawable.ic_placeholder_peertube)
.setView(dialogBinding.getRoot())
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.ok, (dialog1, which) -> {
@@ -411,7 +411,7 @@ void bind(final int position, final TabViewHolder holder) {
lastChecked = instanceRB;
}
});
- instanceIconView.setImageResource(R.drawable.place_holder_peertube);
+ instanceIconView.setImageResource(R.drawable.ic_placeholder_peertube);
}
@SuppressLint("ClickableViewAccessibility")
diff --git a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java
index d41493a7fc2..bf173e08d2a 100644
--- a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java
@@ -31,17 +31,17 @@ private ServiceHelper() { }
public static int getIcon(final int serviceId) {
switch (serviceId) {
case 0:
- return R.drawable.place_holder_youtube;
+ return R.drawable.ic_smart_display;
case 1:
- return R.drawable.place_holder_cloud;
+ return R.drawable.ic_cloud;
case 2:
- return R.drawable.place_holder_gadse;
+ return R.drawable.ic_placeholder_media_ccc;
case 3:
- return R.drawable.place_holder_peertube;
+ return R.drawable.ic_placeholder_peertube;
case 4:
- return R.drawable.place_holder_bandcamp;
+ return R.drawable.ic_placeholder_bandcamp;
default:
- return R.drawable.place_holder_circle;
+ return R.drawable.ic_circle;
}
}
diff --git a/app/src/main/res/drawable-nodpi/place_holder_bandcamp.png b/app/src/main/res/drawable-nodpi/place_holder_bandcamp.png
deleted file mode 100644
index 13c44b64900..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_bandcamp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-nodpi/place_holder_circle.png b/app/src/main/res/drawable-nodpi/place_holder_circle.png
deleted file mode 100644
index 630d0454e53..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_circle.png and /dev/null differ
diff --git a/app/src/main/res/drawable-nodpi/place_holder_cloud.png b/app/src/main/res/drawable-nodpi/place_holder_cloud.png
deleted file mode 100644
index c4ba2a6f4c9..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_cloud.png and /dev/null differ
diff --git a/app/src/main/res/drawable-nodpi/place_holder_gadse.png b/app/src/main/res/drawable-nodpi/place_holder_gadse.png
deleted file mode 100644
index 9b479ed4ff5..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_gadse.png and /dev/null differ
diff --git a/app/src/main/res/drawable-nodpi/place_holder_peertube.png b/app/src/main/res/drawable-nodpi/place_holder_peertube.png
deleted file mode 100644
index 81dfdb8cc11..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_peertube.png and /dev/null differ
diff --git a/app/src/main/res/drawable-nodpi/place_holder_youtube.png b/app/src/main/res/drawable-nodpi/place_holder_youtube.png
deleted file mode 100644
index d147c6643a2..00000000000
Binary files a/app/src/main/res/drawable-nodpi/place_holder_youtube.png and /dev/null differ
diff --git a/app/src/main/res/drawable/ic_circle.xml b/app/src/main/res/drawable/ic_circle.xml
new file mode 100644
index 00000000000..dc0a218b8db
--- /dev/null
+++ b/app/src/main/res/drawable/ic_circle.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_cloud.xml b/app/src/main/res/drawable/ic_cloud.xml
new file mode 100644
index 00000000000..15a682b76e5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_cloud.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_placeholder_bandcamp.xml b/app/src/main/res/drawable/ic_placeholder_bandcamp.xml
new file mode 100644
index 00000000000..411e6985497
--- /dev/null
+++ b/app/src/main/res/drawable/ic_placeholder_bandcamp.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_placeholder_media_ccc.xml b/app/src/main/res/drawable/ic_placeholder_media_ccc.xml
new file mode 100644
index 00000000000..cdc743cb2de
--- /dev/null
+++ b/app/src/main/res/drawable/ic_placeholder_media_ccc.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_placeholder_peertube.xml b/app/src/main/res/drawable/ic_placeholder_peertube.xml
new file mode 100644
index 00000000000..263d92d701d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_placeholder_peertube.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_smart_display.xml b/app/src/main/res/drawable/ic_smart_display.xml
new file mode 100644
index 00000000000..d666a3b3739
--- /dev/null
+++ b/app/src/main/res/drawable/ic_smart_display.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml
index d2e936870d0..94e045863b8 100644
--- a/app/src/main/res/layout/drawer_header.xml
+++ b/app/src/main/res/layout/drawer_header.xml
@@ -86,7 +86,7 @@
android:scaleType="fitCenter"
app:tint="@color/drawer_header_font_color"
tools:ignore="ContentDescription"
- tools:srcCompat="@drawable/place_holder_youtube" />
+ tools:srcCompat="@drawable/ic_smart_display" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/item_instance.xml b/app/src/main/res/layout/item_instance.xml
index 1a96c5bb246..dd5b4156fc5 100644
--- a/app/src/main/res/layout/item_instance.xml
+++ b/app/src/main/res/layout/item_instance.xml
@@ -26,7 +26,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
tools:ignore="ContentDescription,RtlHardcoded"
- tools:src="@drawable/place_holder_peertube" />
+ tools:src="@drawable/ic_placeholder_peertube" />
-
-
-
-
-
-
diff --git a/app/src/main/res/menu/menu_playlist.xml b/app/src/main/res/menu/menu_playlist.xml
index 8e3ea155963..91ec1bc9488 100644
--- a/app/src/main/res/menu/menu_playlist.xml
+++ b/app/src/main/res/menu/menu_playlist.xml
@@ -28,4 +28,10 @@
android:orderInCategory="2"
android:title="@string/open_in_browser"
app:showAsAction="never" />
+
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 022dc517944..419b3ca4376 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -58,11 +58,6 @@
150dp
9dp
- 32dp
- 42dp
- 24dp
-
- 9dp
15sp
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index bf42aaf0e51..c13caf610d7 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -4,10 +4,6 @@
last_used_preferences_version
-
- - @string/youtube
- - @string/soundcloud
-
service
@string/youtube
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 7c126558079..894e70bad92 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -131,10 +131,6 @@
+