mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Merge pull request #6123 from Bnyro/master
style: minor channel page header redesign
This commit is contained in:
commit
b275ba82f4
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user