mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
commit
c16d734e64
@ -1,6 +1,7 @@
|
|||||||
package com.github.libretube.ui.sheets
|
package com.github.libretube.ui.sheets
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
|
import android.content.res.Configuration
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
@ -13,6 +14,8 @@ open class ExpandedBottomSheet : BottomSheetDialogFragment() {
|
|||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
|
val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
|
||||||
|
|
||||||
|
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) return dialog
|
||||||
|
|
||||||
dialog.setOnShowListener {
|
dialog.setOnShowListener {
|
||||||
(it as BottomSheetDialog).let { d ->
|
(it as BottomSheetDialog).let { d ->
|
||||||
(d.findViewById<View>(R.id.design_bottom_sheet) as FrameLayout?)?.let {
|
(d.findViewById<View>(R.id.design_bottom_sheet) as FrameLayout?)?.let {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:tint="@android:color/holo_green_dark"
|
android:tint="?attr/colorPrimary"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
|
@ -83,29 +83,35 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
|
android:maxLines="1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/thumbnail_card"
|
app:layout_constraintStart_toEndOf="@id/thumbnail_card"
|
||||||
app:layout_constraintTop_toBottomOf="@id/video_title" />
|
app:layout_constraintTop_toBottomOf="@id/video_title" />
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView
|
<LinearLayout
|
||||||
android:id="@+id/channel_image"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/video_info" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/channel_name"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginHorizontal="8dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="8dp"
|
||||||
android:ellipsize="end"
|
android:orientation="horizontal"
|
||||||
android:maxLines="1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/channel_image"
|
app:layout_constraintStart_toStartOf="@+id/guideline"
|
||||||
app:layout_constraintTop_toBottomOf="@id/video_info" />
|
app:layout_constraintTop_toBottomOf="@id/video_info">
|
||||||
|
|
||||||
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
|
android:id="@+id/channel_image"
|
||||||
|
android:layout_width="27dp"
|
||||||
|
android:layout_height="27dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/channel_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
x
Reference in New Issue
Block a user