mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-02-05 12:45:46 +00:00
Fix issues in peeking media. Fix UI issues in exo_playback_control_view.
This commit is contained in:
@ -1796,7 +1796,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
if (canStartActivity) {
|
||||
canStartActivity = false;
|
||||
if (post.getPostType() == Post.VIDEO_TYPE) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
if (peekMedia) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
}
|
||||
|
||||
Intent intent = new Intent(mActivity, ViewVideoActivity.class);
|
||||
if (post.isImgur()) {
|
||||
@ -1829,7 +1831,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, post.isNSFW());
|
||||
mActivity.startActivity(intent);
|
||||
} else if (post.getPostType() == Post.IMAGE_TYPE) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
if (peekMedia) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
}
|
||||
|
||||
Intent intent = new Intent(mActivity, ViewImageOrGifActivity.class);
|
||||
intent.putExtra(ViewImageOrGifActivity.EXTRA_IMAGE_URL_KEY, post.getUrl());
|
||||
@ -1840,7 +1844,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
intent.putExtra(ViewImageOrGifActivity.EXTRA_IS_NSFW, post.isNSFW());
|
||||
mActivity.startActivity(intent);
|
||||
} else if (post.getPostType() == Post.GIF_TYPE) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
if (peekMedia) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
}
|
||||
|
||||
if (post.getMp4Variant() != null) {
|
||||
Intent intent = new Intent(mActivity, ViewVideoActivity.class);
|
||||
@ -1873,7 +1879,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
|
||||
mActivity.startActivity(intent);
|
||||
}
|
||||
} else if (post.getPostType() == Post.GALLERY_TYPE) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
if (peekMedia) {
|
||||
mActivity.setShouldTrackFullscreenMediaPeekTouchEvent(true);
|
||||
}
|
||||
|
||||
Intent intent = new Intent(mActivity, ViewRedditGalleryActivity.class);
|
||||
intent.putExtra(ViewRedditGalleryActivity.EXTRA_POST, post);
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:strokeWidth="0dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
@ -54,9 +55,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:spacing="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/hd_exo_playback_control_view"
|
||||
app:layout_constraintEnd_toStartOf="@+id/endBarrier"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@id/mute_exo_playback_control_view"
|
||||
app:layout_constraintStart_toEndOf="@id/startBarrier"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@ -108,9 +109,26 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/button_group_exo_playback_control_view"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:strokeWidth="0dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/startBarrier"
|
||||
app:barrierDirection="start"
|
||||
app:constraint_referenced_ids="mute_exo_playback_control_view"
|
||||
app:barrierAllowsGoneWidgets="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/endBarrier"
|
||||
app:barrierDirection="end"
|
||||
app:constraint_referenced_ids="hd_exo_playback_control_view"
|
||||
app:barrierAllowsGoneWidgets="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user