Merge pull request #8946 from HybridAU/add_play_queue_button_to_video_details_fragment
Add play queue button to video details fragment
This commit is contained in:
commit
8bc8355b68
|
@ -526,6 +526,9 @@ public final class VideoDetailFragment
|
|||
case R.id.overlay_buttons_layout:
|
||||
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
break;
|
||||
case R.id.overlay_play_queue_button:
|
||||
NavigationHelper.openPlayQueue(getContext());
|
||||
break;
|
||||
case R.id.overlay_play_pause_button:
|
||||
if (playerIsNotStopped()) {
|
||||
player.playPause();
|
||||
|
@ -684,6 +687,7 @@ public final class VideoDetailFragment
|
|||
binding.overlayMetadataLayout.setOnClickListener(this);
|
||||
binding.overlayMetadataLayout.setOnLongClickListener(this);
|
||||
binding.overlayButtonsLayout.setOnClickListener(this);
|
||||
binding.overlayPlayQueueButton.setOnClickListener(this);
|
||||
binding.overlayCloseButton.setOnClickListener(this);
|
||||
binding.overlayPlayPauseButton.setOnClickListener(this);
|
||||
|
||||
|
@ -2426,6 +2430,7 @@ public final class VideoDetailFragment
|
|||
binding.overlayMetadataLayout.setClickable(enable);
|
||||
binding.overlayMetadataLayout.setLongClickable(enable);
|
||||
binding.overlayButtonsLayout.setClickable(enable);
|
||||
binding.overlayPlayQueueButton.setClickable(enable);
|
||||
binding.overlayPlayPauseButton.setClickable(enable);
|
||||
binding.overlayCloseButton.setClickable(enable);
|
||||
}
|
||||
|
|
|
@ -212,7 +212,6 @@ public final class PlayQueueActivity extends AppCompatActivity
|
|||
|
||||
if (player == null || player.getPlayQueue() == null || player.exoPlayerIsNull()) {
|
||||
unbind();
|
||||
finish();
|
||||
} else {
|
||||
onQueueUpdate(player.getPlayQueue());
|
||||
buildComponents();
|
||||
|
|
|
@ -639,6 +639,11 @@ public final class NavigationHelper {
|
|||
return intent;
|
||||
}
|
||||
|
||||
public static void openPlayQueue(final Context context) {
|
||||
final Intent intent = new Intent(context, PlayQueueActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Link handling
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
|
|
@ -698,6 +698,16 @@
|
|||
android:paddingRight="@dimen/video_item_search_padding"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_queue_button"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_list"
|
||||
tools:ignore="ContentDescription,RtlHardcoded" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_pause_button"
|
||||
android:layout_width="40dp"
|
||||
|
|
|
@ -673,6 +673,16 @@
|
|||
android:theme="@style/ContrastTintTheme"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_queue_button"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_list"
|
||||
tools:ignore="ContentDescription,RtlHardcoded" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/overlay_play_pause_button"
|
||||
android:layout_width="40dp"
|
||||
|
|
Loading…
Reference in New Issue