mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
better description layout
This commit is contained in:
parent
f81446095d
commit
81b176b4d6
@ -54,6 +54,7 @@ class MainActivity : AppCompatActivity() {
|
||||
DynamicColors.applyToActivityIfAvailable(this)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// start service that gets called on closure
|
||||
startService(Intent(this, ClosingService::class.java))
|
||||
|
||||
CronetHelper.initCronet(this.applicationContext)
|
||||
|
@ -252,14 +252,12 @@ class PlayerFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
|
||||
// video description and chapters toggle
|
||||
val descLinLayout = view.findViewById<LinearLayout>(R.id.desc_linLayout)
|
||||
view.findViewById<RelativeLayout>(R.id.player_title_layout).setOnClickListener {
|
||||
val arrowImageView = view.findViewById<ImageView>(R.id.player_description_arrow)
|
||||
arrowImageView.animate().rotationBy(180F).setDuration(100).start()
|
||||
if (playerDescription.isVisible) {
|
||||
playerDescription.visibility = View.GONE
|
||||
} else {
|
||||
playerDescription.visibility = View.VISIBLE
|
||||
}
|
||||
descLinLayout.visibility = if (descLinLayout.isVisible) View.GONE else View.VISIBLE
|
||||
}
|
||||
|
||||
view.findViewById<MaterialCardView>(R.id.comments_toggle)
|
||||
@ -723,6 +721,7 @@ class PlayerFragment : Fragment() {
|
||||
chaptersRecView?.layoutManager =
|
||||
LinearLayoutManager(this.context, LinearLayoutManager.HORIZONTAL, false)
|
||||
chaptersRecView?.adapter = ChaptersAdapter(chapters, exoPlayer)
|
||||
chaptersRecView?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="80dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
app:shapeAppearanceOverlay="@style/roundedImageViewRounded"
|
||||
android:id="@+id/chapter_image"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
|
@ -23,7 +23,8 @@
|
||||
android:id="@+id/linLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/player_title_layout"
|
||||
@ -64,8 +65,8 @@
|
||||
<TextView
|
||||
android:id="@+id/player_views_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="10M views 2 days ago " />
|
||||
|
||||
<LinearLayout
|
||||
@ -75,9 +76,9 @@
|
||||
android:layout_marginTop="2dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_like" />
|
||||
|
||||
<TextView
|
||||
@ -88,12 +89,12 @@
|
||||
android:text="4.2K" />
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/ic_like"
|
||||
android:rotation="180"/>
|
||||
android:rotation="180"
|
||||
android:src="@drawable/ic_like" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textDislike"
|
||||
@ -106,14 +107,20 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/desc_linLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/chapters_recView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/comments_toggle"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginHorizontal="3dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
@ -124,9 +131,9 @@
|
||||
android:autoLink="web"
|
||||
android:padding="8dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.Material3.CardView.Elevated"
|
||||
|
Loading…
x
Reference in New Issue
Block a user