Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,6 @@ class ChannelFragment : DynamicLayoutManagerFragment() {
binding.notificationBell
)

binding.channelSubscribe.setOnLongClickListener {
AddChannelToGroupSheet().apply {
arguments = bundleOf(IntentData.channelId to channelId)
}.show(childFragmentManager)

true
}

binding.channelShare.setOnClickListener {
val bundle = bundleOf(
IntentData.id to channelId.toID(),
Expand All @@ -181,6 +173,12 @@ class ChannelFragment : DynamicLayoutManagerFragment() {
newShareDialog.show(childFragmentManager, ShareDialog::class.java.name)
}

binding.addToGroup.setOnClickListener {
AddChannelToGroupSheet().apply {
arguments = bundleOf(IntentData.channelId to channelId)
}.show(childFragmentManager)
}

nextPages[0] = response.nextpage
isLoading = false
binding.channelRefresh.isRefreshing = false
Expand Down
67 changes: 44 additions & 23 deletions app/src/main/res/layout/fragment_channel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,58 @@

</LinearLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/channel_share"
style="@style/ElevatedIconButton"
android:tooltipText="@string/share"
app:icon="@drawable/ic_share"
tools:targetApi="m" />

<com.google.android.material.button.MaterialButton
android:id="@+id/notification_bell"
style="@style/ElevatedIconButton"
android:tooltipText="@string/notifications"
app:icon="@drawable/ic_notification"
tools:targetApi="m" />

<com.google.android.material.button.MaterialButton
android:id="@+id/channel_subscribe"
style="@style/Widget.Material3.Button.ElevatedButton"
style="@style/PlayerActionsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTint="?android:attr/textColorPrimary"
android:stateListAnimator="@null"
android:text="@string/subscribe"
android:textColor="?android:attr/textColorPrimary"
android:textSize="12sp"
app:cornerRadius="20dp"
app:elevation="20dp"
tools:targetApi="m" />

</LinearLayout>

<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.button.MaterialButton
android:id="@+id/channel_share"
style="@style/PlayerActionsButton"
android:text="@string/share"
android:textSize="12sp"
android:tooltipText="@string/share"
app:icon="@drawable/ic_share"
tools:targetApi="m" />

<com.google.android.material.button.MaterialButton
android:id="@+id/notification_bell"
style="@style/PlayerActionsButton"
android:text="@string/notifications"
android:textSize="12sp"
android:tooltipText="@string/notifications"
app:icon="@drawable/ic_notification"
tools:targetApi="m" />

<com.google.android.material.button.MaterialButton
android:id="@+id/add_to_group"
style="@style/PlayerActionsButton"
android:text="@string/add_to_group"
android:textSize="12sp"
android:tooltipText="@string/add_to_group"
app:icon="@drawable/ic_add"
tools:targetApi="m" />

</LinearLayout>

</HorizontalScrollView>

<com.github.libretube.ui.views.ExpandableTextView
android:id="@+id/channel_description"
android:layout_width="match_parent"
Expand All @@ -122,21 +144,20 @@
</LinearLayout>

</com.google.android.material.appbar.CollapsingToolbarLayout>

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"
/>
app:tabMode="scrollable" />

</com.google.android.material.appbar.AppBarLayout>

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</com.github.libretube.ui.views.CustomSwipeToRefresh>