Don't show sub-channel thumbnail by default

This commit is contained in:
wb9688 2020-05-07 20:51:54 +02:00
parent b7d4a4f604
commit 235394d96c
5 changed files with 1029 additions and 1026 deletions

View File

@ -1160,7 +1160,6 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
} else if (!TextUtils.isEmpty(info.getUploaderName())) { } else if (!TextUtils.isEmpty(info.getUploaderName())) {
displayUploaderAsSubChannel(info); displayUploaderAsSubChannel(info);
} else { } else {
subChannelThumb.setVisibility(View.GONE);
uploaderTextView.setVisibility(View.GONE); uploaderTextView.setVisibility(View.GONE);
uploaderThumb.setVisibility(View.GONE); uploaderThumb.setVisibility(View.GONE);
} }
@ -1296,11 +1295,11 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
} }
private void displayUploaderAsSubChannel(final StreamInfo info) { private void displayUploaderAsSubChannel(final StreamInfo info) {
subChannelTextView.setText(info.getUploaderName()); subChannelTextView.setText(info.getUploaderName());
subChannelTextView.setVisibility(View.VISIBLE); subChannelTextView.setVisibility(View.VISIBLE);
subChannelTextView.setSelected(true); subChannelTextView.setSelected(true);
subChannelThumb.setVisibility(View.GONE);
uploaderTextView.setVisibility(View.GONE); uploaderTextView.setVisibility(View.GONE);
} }
@ -1309,6 +1308,8 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
subChannelTextView.setVisibility(View.VISIBLE); subChannelTextView.setVisibility(View.VISIBLE);
subChannelTextView.setSelected(true); subChannelTextView.setSelected(true);
subChannelThumb.setVisibility(View.VISIBLE);
if (!TextUtils.isEmpty(info.getUploaderName())) { if (!TextUtils.isEmpty(info.getUploaderName())) {
uploaderTextView.setText( uploaderTextView.setText(
String.format(getString(R.string.video_detail_by), info.getUploaderName())); String.format(getString(R.string.video_detail_by), info.getUploaderName()));

View File

@ -480,9 +480,9 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo>
currentInfo.getSubChannelName()) currentInfo.getSubChannelName())
); );
headerSubChannelTitleView.setVisibility(View.VISIBLE); headerSubChannelTitleView.setVisibility(View.VISIBLE);
headerSubChannelAvatarView.setVisibility(View.VISIBLE);
} else { } else {
headerSubChannelTitleView.setVisibility(View.GONE); headerSubChannelTitleView.setVisibility(View.GONE);
headerSubChannelAvatarView.setVisibility(View.GONE);
} }
if (menuRssButton != null) { if (menuRssButton != null) {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/channel_header_layout" android:id="@+id/channel_header_layout"
@ -21,7 +20,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/channel_banner" android:src="@drawable/channel_banner"
tools:ignore="ContentDescription"/> tools:ignore="ContentDescription" />
<FrameLayout <FrameLayout
android:id="@+id/avatars_layout" android:id="@+id/avatars_layout"
@ -36,8 +35,7 @@
android:layout_height="@dimen/channel_avatar_size" android:layout_height="@dimen/channel_avatar_size"
android:src="@drawable/buddy" android:src="@drawable/buddy"
app:civ_border_color="#ffffff" app:civ_border_color="#ffffff"
app:civ_border_width="2dp" app:civ_border_width="2dp" />
tools:ignore="RtlHardcoded" />
<de.hdodenhof.circleimageview.CircleImageView <de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/sub_channel_avatar_view" android:id="@+id/sub_channel_avatar_view"
@ -45,9 +43,11 @@
android:layout_height="35dp" android:layout_height="35dp"
android:layout_gravity="bottom|right" android:layout_gravity="bottom|right"
android:src="@drawable/buddy" android:src="@drawable/buddy"
android:visibility="gone"
app:civ_border_color="#ffffff" app:civ_border_color="#ffffff"
app:civ_border_width="2dp" app:civ_border_width="2dp"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded"
tools:visibility="visible" />
</FrameLayout> </FrameLayout>
<TextView <TextView
@ -102,8 +102,8 @@
android:id="@+id/channel_subscribe_button" android:id="@+id/channel_subscribe_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/channel_banner_image" android:layout_below="@+id/channel_banner_image"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical|right" android:layout_gravity="center_vertical|right"
android:layout_marginRight="2dp" android:layout_marginRight="2dp"
android:text="@string/subscribe_button_title" android:text="@string/subscribe_button_title"
@ -111,7 +111,7 @@
android:theme="@style/RedButton" android:theme="@style/RedButton"
android:visibility="gone" android:visibility="gone"
tools:ignore="RtlHardcoded" tools:ignore="RtlHardcoded"
tools:visibility="visible"/> tools:visibility="visible" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@ -122,4 +122,4 @@
<include layout="@layout/playlist_control" /> <include layout="@layout/playlist_control" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

File diff suppressed because it is too large Load Diff