Merge pull request #6123 from Bnyro/master

style: minor channel page header redesign
This commit is contained in:
Bnyro 2024-06-10 14:58:00 +02:00 committed by GitHub
commit b275ba82f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 50 additions and 31 deletions

View File

@ -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(),
@ -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

View File

@ -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"
@ -122,12 +144,12 @@
</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>
@ -135,8 +157,7 @@
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>