LibreTube/app/src/main/res/layout/fragment_channel.xml

171 lines
7.1 KiB
XML
Raw Normal View History

2022-02-05 00:25:05 +05:30
<?xml version="1.0" encoding="utf-8"?>
2022-09-20 23:23:34 +05:30
<com.github.libretube.ui.views.CustomSwipeToRefresh xmlns:android="http://schemas.android.com/apk/res/android"
2022-07-11 19:55:47 +05:30
xmlns:app="http://schemas.android.com/apk/res-auto"
2022-02-05 00:25:05 +05:30
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/channel_refresh"
2022-02-05 00:25:05 +05:30
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/channel_scrollView"
2022-02-05 00:25:05 +05:30
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
2022-06-27 22:47:52 +05:30
android:visibility="invisible"
2022-09-20 23:23:34 +05:30
tools:context=".ui.fragments.ChannelFragment">
<LinearLayout
android:layout_width="match_parent"
2022-04-29 21:13:24 +05:30
android:layout_height="wrap_content"
android:orientation="vertical">
2022-02-05 00:25:05 +05:30
<ImageView
android:id="@+id/channel_banner"
android:layout_width="match_parent"
android:layout_height="80dp" />
2022-04-29 21:13:24 +05:30
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
2022-10-19 23:16:54 +05:30
android:layout_gravity="center"
2022-10-19 23:23:18 +05:30
android:layout_margin="10dp"
2022-04-29 21:13:24 +05:30
android:orientation="horizontal">
2022-04-29 21:13:24 +05:30
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/channel_image"
2022-11-11 22:22:27 +05:30
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center" />
2022-04-29 21:13:24 +05:30
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
2022-07-28 19:41:35 +05:30
android:layout_marginStart="10dp"
android:layout_marginEnd="5dp"
2022-06-27 22:47:52 +05:30
android:layout_weight="1"
android:orientation="vertical">
2022-11-06 15:56:24 +05:30
<TextView
android:id="@+id/channel_name"
2022-11-11 22:22:27 +05:30
android:layout_width="wrap_content"
2022-06-27 22:47:52 +05:30
android:layout_height="wrap_content"
2022-11-06 15:56:24 +05:30
android:layout_gravity="start"
android:layout_marginTop="3.5dp"
android:drawablePadding="3dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="16sp"
android:textStyle="bold"
tools:text="Channel Name" />
2022-05-16 00:41:27 +05:30
2022-04-29 21:13:24 +05:30
<TextView
android:id="@+id/channel_subs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2022-07-08 02:10:32 +05:30
android:layout_gravity="start"
2022-11-06 16:00:38 +05:30
android:maxLines="1"
2022-04-29 21:13:24 +05:30
android:text="@string/app_name"
android:textSize="12sp" />
2022-04-29 21:13:24 +05:30
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/channel_share"
2022-11-06 16:00:38 +05:30
style="@style/ElevatedIconButton"
2022-10-10 01:43:41 +05:30
app:icon="@drawable/ic_share"
tools:targetApi="m" />
2022-11-06 15:56:24 +05:30
<com.google.android.material.button.MaterialButton
android:id="@+id/notification_bell"
style="@style/ElevatedIconButton"
app:icon="@drawable/ic_notification"
tools:targetApi="m" />
2022-04-29 21:13:24 +05:30
<com.google.android.material.button.MaterialButton
android:id="@+id/channel_subscribe"
2022-07-11 19:55:47 +05:30
style="@style/Widget.Material3.Button.ElevatedButton"
2022-04-29 21:13:24 +05:30
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2022-07-11 19:55:47 +05:30
android:drawableTint="?android:attr/textColorPrimary"
2022-07-18 23:06:21 +05:30
android:stateListAnimator="@null"
2022-04-29 21:13:24 +05:30
android:text="@string/subscribe"
2022-06-17 22:46:37 +05:30
android:textColor="?android:attr/textColorPrimary"
2022-07-11 19:55:47 +05:30
android:textSize="12sp"
2022-07-18 23:06:21 +05:30
app:cornerRadius="20dp"
2022-07-28 19:41:35 +05:30
app:elevation="20dp"
tools:targetApi="m" />
2022-04-29 21:13:24 +05:30
</LinearLayout>
<TextView
android:id="@+id/channel_description"
2022-10-19 23:32:11 +05:30
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
2022-10-19 23:16:54 +05:30
android:autoLink="web"
2022-10-19 23:23:18 +05:30
android:background="@drawable/rounded_ripple"
2022-10-19 23:16:54 +05:30
android:ellipsize="end"
2022-10-19 23:32:11 +05:30
android:maxLines="2"
android:padding="10dp" />
2022-10-29 15:36:25 +05:30
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="10dp"
android:scrollbars="none">
<com.google.android.material.chip.ChipGroup
2022-10-29 15:46:48 +05:30
android:id="@+id/tab_chips"
2022-10-29 15:36:25 +05:30
android:layout_width="wrap_content"
2022-11-05 23:38:02 +05:30
android:layout_height="wrap_content"
app:checkedChip="@+id/videos"
app:selectionRequired="true"
app:singleLine="true"
app:singleSelection="true">
2022-10-29 15:36:25 +05:30
<com.google.android.material.chip.Chip
2022-11-05 23:38:02 +05:30
android:id="@id/videos"
2022-10-29 15:36:25 +05:30
style="@style/channelChip"
android:text="@string/videos"
android:visibility="visible" />
<com.google.android.material.chip.Chip
android:id="@+id/playlists"
style="@style/channelChip"
android:text="@string/playlists" />
<com.google.android.material.chip.Chip
android:id="@+id/shorts"
style="@style/channelChip"
android:text="@string/yt_shorts" />
<com.google.android.material.chip.Chip
android:id="@+id/channels"
style="@style/channelChip"
android:text="@string/channels" />
<com.google.android.material.chip.Chip
android:id="@+id/livestreams"
style="@style/channelChip"
android:text="@string/livestreams" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>
<RelativeLayout
2022-02-05 00:25:05 +05:30
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/channel_recView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
2022-09-20 23:23:34 +05:30
</com.github.libretube.ui.views.CustomSwipeToRefresh>