Commit b516d714 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Better display of video info on TV when video and audi are mixed

parent ae9b6664
......@@ -54,113 +54,117 @@
</data>
<org.videolan.vlc.gui.tv.FocusableConstraintLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/tv_card_background"
android:clickable="true"
android:focusable="true"
android:longClickable="true"
android:minHeight="@dimen/audio_browser_item_size"
android:onClick="@{holder::onClick}"
android:onLongClick="@{holder::onLongClick}"
android:paddingBottom="@dimen/kl_small"
android:stateListAnimator="@animator/tv_recyclerview_item_pop"
vlc:elevation="1dp">
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/tv_card_background"
android:clickable="true"
android:focusable="true"
android:longClickable="true"
android:minHeight="@dimen/audio_browser_item_size"
android:onClick="@{holder::onClick}"
android:onLongClick="@{holder::onLongClick}"
android:paddingBottom="@dimen/kl_small"
android:stateListAnimator="@animator/tv_recyclerview_item_pop"
vlc:elevation="1dp">
<!-- Image loading is handled by org.videolan.vlc.gui.helpers.ImageLoader.loadImage() -->
<ImageView
android:id="@+id/media_cover"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:background="@color/lb_details_overview_bg_color"
tools:srcCompat="@drawable/ic_album_big"
vlc:constraintRatio="@{isSquare}"
android:src="@{cover}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toTopOf="parent"
vlc:media="@{item}" />
android:id="@+id/media_cover"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:background="@color/lb_details_overview_bg_color"
tools:srcCompat="@drawable/ic_album_big"
vlc:constraintRatio="@{isSquare}"
android:src="@{cover}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toTopOf="parent"
vlc:media="@{item}"/>
<ImageView
android:id="@+id/ml_item_seen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_seen_normal"
android:visibility="@{seen == 0L ? View.GONE : View.VISIBLE}"
vlc:layout_constraintRight_toRightOf="parent"
vlc:layout_constraintTop_toTopOf="parent" />
android:id="@+id/ml_item_seen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_seen_normal"
android:visibility="@{seen == 0L ? View.GONE : View.VISIBLE}"
vlc:layout_constraintRight_toRightOf="parent"
vlc:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/badgeTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/rounded_corners"
android:padding="@dimen/kl_half"
android:text="@{badge}"
android:textSize="12sp"
tools:text="4K"
vlc:layout_constraintBottom_toBottomOf="@id/media_cover"
vlc:layout_constraintEnd_toEndOf="parent" />
android:id="@+id/badgeTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/rounded_corners"
android:padding="@dimen/kl_half"
android:text="@{badge}"
android:textSize="12sp"
tools:text="4K"
vlc:layout_constraintBottom_toBottomOf="@id/media_cover"
vlc:layout_constraintEnd_toEndOf="parent"/>
<ProgressBar
android:id="@+id/progressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:background="@color/transparent"
android:indeterminate="false"
android:max="@{max}"
android:progress="@{progress}"
android:progressDrawable="@drawable/gridview_progressbar"
android:visibility="@{progress > 0 ? View.VISIBLE : View.GONE}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@id/media_cover" />
android:id="@+id/progressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:background="@color/transparent"
android:indeterminate="false"
android:max="@{max}"
android:progress="@{progress}"
android:progressDrawable="@drawable/gridview_progressbar"
android:visibility="@{progress > 0 ? View.VISIBLE : View.GONE}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@id/media_cover"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="2"
android:textSize="12sp"
tools:text="Title"
vlc:asyncText="@{item.title}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@+id/progressBar"
vlc:placeholder="@{item}" />
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="2"
android:textSize="12sp"
tools:text="Title"
vlc:asyncText="@{item.title}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@+id/progressBar"
vlc:placeholder="@{item}"
vlc:layout_constraintHorizontal_bias="0.5"
vlc:layout_constraintBottom_toTopOf="@+id/subtitle"
vlc:layout_constraintVertical_chainStyle="packed"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/VLCImageCardViewContentStyleTextAppearance"
android:textSize="11sp"
tools:text="@string/add_custom_path_description"
vlc:asyncText="@{description}"
vlc:layout_constraintBottom_toBottomOf="parent"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@+id/title"
vlc:placeholder="@{item}" />
android:id="@+id/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/VLCImageCardViewContentStyleTextAppearance"
android:textSize="11sp"
tools:text="@string/add_custom_path_description"
vlc:asyncText="@{description}"
vlc:layout_constraintBottom_toBottomOf="parent"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintTop_toBottomOf="@+id/title"
vlc:placeholder="@{item}"
vlc:layout_constraintHorizontal_bias="0.5"/>
</org.videolan.vlc.gui.tv.FocusableConstraintLayout>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment