mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-11 09:50:32 +00:00
-Increased save join debounce time to 2 seconds.
-Added add to playlist option for videos available as base list items. -Moved video count to second row on local playlist header. -Removed bottom line on playlist control UI.
This commit is contained in:
parent
1ff8b5fb9f
commit
53a1833e26
@ -29,6 +29,7 @@ import org.schabi.newpipe.util.OnClickGesture;
|
|||||||
import org.schabi.newpipe.util.StateSaver;
|
import org.schabi.newpipe.util.StateSaver;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
|
|
||||||
@ -194,22 +195,26 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||||||
|
|
||||||
final String[] commands = new String[]{
|
final String[] commands = new String[]{
|
||||||
context.getResources().getString(R.string.enqueue_on_background),
|
context.getResources().getString(R.string.enqueue_on_background),
|
||||||
context.getResources().getString(R.string.enqueue_on_popup)
|
context.getResources().getString(R.string.enqueue_on_popup),
|
||||||
|
context.getResources().getString(R.string.append_playlist)
|
||||||
};
|
};
|
||||||
|
|
||||||
final DialogInterface.OnClickListener actions = new DialogInterface.OnClickListener() {
|
final DialogInterface.OnClickListener actions = (dialogInterface, i) -> {
|
||||||
@Override
|
switch (i) {
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
case 0:
|
||||||
switch (i) {
|
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
|
||||||
case 0:
|
break;
|
||||||
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
|
case 1:
|
||||||
break;
|
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
|
||||||
case 1:
|
break;
|
||||||
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
|
case 2:
|
||||||
break;
|
if (getFragmentManager() != null) {
|
||||||
default:
|
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
|
||||||
break;
|
.show(getFragmentManager(), TAG);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
|||||||
|
|
||||||
public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistStreamEntry>, Void> {
|
public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistStreamEntry>, Void> {
|
||||||
|
|
||||||
private static final long SAVE_DEBOUNCE_MILLIS = 1000;
|
private static final long SAVE_DEBOUNCE_MILLIS = 2000;
|
||||||
|
|
||||||
private View headerRootLayout;
|
private View headerRootLayout;
|
||||||
private TextView headerTitleView;
|
private TextView headerTitleView;
|
||||||
|
@ -5,20 +5,17 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="6dp"
|
||||||
android:background="?attr/contrast_background_color">
|
android:background="?attr/contrast_background_color">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/playlist_title_view"
|
android:id="@+id/playlist_title_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="6dp"
|
android:padding="6dp"
|
||||||
android:paddingBottom="6dp"
|
|
||||||
android:paddingLeft="12dp"
|
|
||||||
android:paddingRight="12dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_toLeftOf="@id/playlist_stream_count"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_toStartOf="@id/playlist_stream_count"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
@ -35,9 +32,11 @@
|
|||||||
android:id="@+id/playlist_stream_count"
|
android:id="@+id/playlist_stream_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@id/playlist_title_view"
|
android:layout_below="@id/playlist_title_view"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:padding="6dp"
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="6dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="right|center_vertical"
|
android:gravity="right|center_vertical"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -10,91 +10,78 @@
|
|||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/playlist_panel"
|
android:id="@+id/playlist_ctrl_play_bg_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/playlist_ctrl_height">
|
android:layout_height="@dimen/playlist_ctrl_height"
|
||||||
<LinearLayout
|
android:layout_weight="1"
|
||||||
android:id="@+id/playlist_ctrl_play_bg_button"
|
android:gravity="center"
|
||||||
android:layout_width="match_parent"
|
android:clickable="true"
|
||||||
android:layout_height="match_parent"
|
android:focusable="true"
|
||||||
android:layout_weight="1"
|
android:background="?attr/selectableItemBackground">
|
||||||
android:gravity="center"
|
<TextView
|
||||||
android:clickable="true"
|
android:layout_width="wrap_content"
|
||||||
android:focusable="true"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground">
|
android:gravity="center_vertical"
|
||||||
<TextView
|
android:text="@string/controls_background_title"
|
||||||
android:layout_width="wrap_content"
|
android:textSize="@dimen/channel_rss_title_size"
|
||||||
android:layout_height="wrap_content"
|
android:textColor="?attr/colorAccent"
|
||||||
android:gravity="center_vertical"
|
android:drawablePadding="4dp"
|
||||||
android:text="@string/controls_background_title"
|
android:drawableLeft="?attr/audio"
|
||||||
android:textSize="@dimen/channel_rss_title_size"
|
android:drawableStart="?attr/audio"/>
|
||||||
android:textColor="?attr/colorAccent"
|
|
||||||
android:drawablePadding="4dp"
|
|
||||||
android:drawableLeft="?attr/audio"
|
|
||||||
android:drawableStart="?attr/audio"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View android:id="@+id/anchorLeft"
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clickable="false"
|
|
||||||
android:layout_marginBottom="@dimen/playlist_ctrl_seperator_margin"
|
|
||||||
android:layout_marginTop="@dimen/playlist_ctrl_seperator_margin"
|
|
||||||
android:background="?attr/colorAccent"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:id="@+id/playlist_ctrl_play_all_button">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/play_all"
|
|
||||||
android:textSize="@dimen/channel_rss_title_size"
|
|
||||||
android:textColor="?attr/colorAccent"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View android:id="@+id/anchorRight"
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clickable="false"
|
|
||||||
android:layout_marginBottom="@dimen/playlist_ctrl_seperator_margin"
|
|
||||||
android:layout_marginTop="@dimen/playlist_ctrl_seperator_margin"
|
|
||||||
android:background="?attr/colorAccent"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:id="@+id/playlist_ctrl_play_popup_button">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/controls_popup_title"
|
|
||||||
android:textSize="@dimen/channel_rss_title_size"
|
|
||||||
android:textColor="?attr/colorAccent"
|
|
||||||
android:drawablePadding="4dp"
|
|
||||||
android:drawableLeft="?attr/popup"
|
|
||||||
android:drawableStart="?attr/popup"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View android:id="@+id/anchorLeft"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clickable="false"
|
||||||
|
android:layout_marginBottom="@dimen/playlist_ctrl_seperator_margin"
|
||||||
|
android:layout_marginTop="@dimen/playlist_ctrl_seperator_margin"
|
||||||
|
android:background="?attr/colorAccent"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/playlist_panel"
|
android:layout_weight="1"
|
||||||
android:layout_marginLeft="8dp"
|
android:gravity="center"
|
||||||
android:layout_marginRight="8dp"
|
android:clickable="true"
|
||||||
android:background="?attr/separator_color"/>
|
android:focusable="true"
|
||||||
</RelativeLayout>
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:id="@+id/playlist_ctrl_play_all_button">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/play_all"
|
||||||
|
android:textSize="@dimen/channel_rss_title_size"
|
||||||
|
android:textColor="?attr/colorAccent"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View android:id="@+id/anchorRight"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clickable="false"
|
||||||
|
android:layout_marginBottom="@dimen/playlist_ctrl_seperator_margin"
|
||||||
|
android:layout_marginTop="@dimen/playlist_ctrl_seperator_margin"
|
||||||
|
android:background="?attr/colorAccent"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:id="@+id/playlist_ctrl_play_popup_button">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/controls_popup_title"
|
||||||
|
android:textSize="@dimen/channel_rss_title_size"
|
||||||
|
android:textColor="?attr/colorAccent"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:drawableLeft="?attr/popup"
|
||||||
|
android:drawableStart="?attr/popup"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user