From 235394d96cbe167be17be32b072226ae45e055ea Mon Sep 17 00:00:00 2001 From: wb9688 Date: Thu, 7 May 2020 20:51:54 +0200 Subject: [PATCH] Don't show sub-channel thumbnail by default --- .../fragments/detail/VideoDetailFragment.java | 5 +- .../list/channel/ChannelFragment.java | 2 +- .../fragment_video_detail.xml | 1019 +++++++++-------- app/src/main/res/layout/channel_header.xml | 18 +- .../main/res/layout/fragment_video_detail.xml | 1011 ++++++++-------- 5 files changed, 1029 insertions(+), 1026 deletions(-) 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 b49bb6a90..e65da09fb 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 @@ -1160,7 +1160,6 @@ public class VideoDetailFragment extends BaseStateFragment } else if (!TextUtils.isEmpty(info.getUploaderName())) { displayUploaderAsSubChannel(info); } else { - subChannelThumb.setVisibility(View.GONE); uploaderTextView.setVisibility(View.GONE); uploaderThumb.setVisibility(View.GONE); } @@ -1296,11 +1295,11 @@ public class VideoDetailFragment extends BaseStateFragment viewPager.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE); } + private void displayUploaderAsSubChannel(final StreamInfo info) { subChannelTextView.setText(info.getUploaderName()); subChannelTextView.setVisibility(View.VISIBLE); subChannelTextView.setSelected(true); - subChannelThumb.setVisibility(View.GONE); uploaderTextView.setVisibility(View.GONE); } @@ -1309,6 +1308,8 @@ public class VideoDetailFragment extends BaseStateFragment subChannelTextView.setVisibility(View.VISIBLE); subChannelTextView.setSelected(true); + subChannelThumb.setVisibility(View.VISIBLE); + if (!TextUtils.isEmpty(info.getUploaderName())) { uploaderTextView.setText( String.format(getString(R.string.video_detail_by), info.getUploaderName())); 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 315660710..eccedd0ed 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 @@ -480,9 +480,9 @@ public class ChannelFragment extends BaseListInfoFragment currentInfo.getSubChannelName()) ); headerSubChannelTitleView.setVisibility(View.VISIBLE); + headerSubChannelAvatarView.setVisibility(View.VISIBLE); } else { headerSubChannelTitleView.setVisibility(View.GONE); - headerSubChannelAvatarView.setVisibility(View.GONE); } if (menuRssButton != null) { 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 73fe539b1..b119bf761 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 @@ -1,318 +1,319 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/video_item_detail" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:baselineAligned="false" + android:focusableInTouchMode="true" + android:orientation="horizontal" + tools:ignore="RtlHardcoded"> - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - - + + - - + - - + + - + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + diff --git a/app/src/main/res/layout/channel_header.xml b/app/src/main/res/layout/channel_header.xml index 4d2e08c2a..1f63a62ec 100644 --- a/app/src/main/res/layout/channel_header.xml +++ b/app/src/main/res/layout/channel_header.xml @@ -1,6 +1,5 @@ - + tools:ignore="ContentDescription" /> + app:civ_border_width="2dp" /> + tools:ignore="RtlHardcoded" + tools:visibility="visible" /> + tools:visibility="visible" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 487bf1e9d..dfe6435f7 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -1,566 +1,567 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/video_item_detail" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:focusableInTouchMode="true"> - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - +