mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
some UI changes
This commit is contained in:
parent
3345dc9742
commit
a85bf705db
@ -38,7 +38,7 @@ class MarkableTimeBar(
|
|||||||
canvas.save()
|
canvas.save()
|
||||||
length = canvas.width - 2 * HORIZONTAL_OFFSET
|
length = canvas.width - 2 * HORIZONTAL_OFFSET
|
||||||
|
|
||||||
val marginY = canvas.height / 2 - PROGRESS_HEIGHT / 2
|
val marginY = canvas.height / 2 - PROGRESS_BAR_HEIGHT / 2
|
||||||
|
|
||||||
segments.forEach {
|
segments.forEach {
|
||||||
canvas.drawRect(
|
canvas.drawRect(
|
||||||
@ -46,7 +46,7 @@ class MarkableTimeBar(
|
|||||||
(it.segment.first() + HORIZONTAL_OFFSET).toLength(),
|
(it.segment.first() + HORIZONTAL_OFFSET).toLength(),
|
||||||
marginY,
|
marginY,
|
||||||
(it.segment.last() + HORIZONTAL_OFFSET).toLength(),
|
(it.segment.last() + HORIZONTAL_OFFSET).toLength(),
|
||||||
canvas.height - marginY - 1
|
canvas.height - marginY
|
||||||
),
|
),
|
||||||
Paint().apply {
|
Paint().apply {
|
||||||
color = ThemeHelper.getThemeColor(context, R.attr.colorError)
|
color = ThemeHelper.getThemeColor(context, R.attr.colorError)
|
||||||
@ -74,6 +74,6 @@ class MarkableTimeBar(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val HORIZONTAL_OFFSET = 10
|
const val HORIZONTAL_OFFSET = 10
|
||||||
const val PROGRESS_HEIGHT = 6
|
const val PROGRESS_BAR_HEIGHT = 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,16 +38,18 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="15dp"
|
android:paddingHorizontal="15dp">
|
||||||
android:layout_marginTop="8dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/playlist_name"
|
android:id="@+id/playlist_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:textSize="24sp"
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -32,30 +32,31 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:srcCompat="@tools:sample/backgrounds/scenic" />
|
tools:srcCompat="@tools:sample/backgrounds/scenic" />
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="#CC000000">
|
android:background="#CC000000"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/video_count"
|
android:id="@+id/video_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_gravity="center"
|
||||||
android:layout_centerVertical="true"
|
android:layout_marginTop="5dp"
|
||||||
android:textColor="#ECE4E4" />
|
android:textColor="#ECE4E4" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/video_count"
|
android:layout_gravity="center"
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
app:srcCompat="@drawable/ic_playlist"
|
app:srcCompat="@drawable/ic_playlist"
|
||||||
tools:ignore="RtlSymmetry" />
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -63,6 +64,8 @@
|
|||||||
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:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/delete_playlist"
|
app:layout_constraintEnd_toStartOf="@+id/delete_playlist"
|
||||||
app:layout_constraintStart_toEndOf="@+id/card_playlist_thumbnail"
|
app:layout_constraintStart_toEndOf="@+id/card_playlist_thumbnail"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
Loading…
Reference in New Issue
Block a user