[Android] Remove TV medialist image width calculation and fix header thumbnail
Nicolas Pomepuy
git at videolan.org
Mon Oct 14 15:35:32 CEST 2019
vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Oct 10 10:25:12 2019 +0200| [7470ae0acf6156cb9e55321d773aa722a4333a94] | committer: Geoffrey Métais
Remove TV medialist image width calculation and fix header thumbnail
> https://code.videolan.org/videolan/vlc-android/commit/7470ae0acf6156cb9e55321d773aa722a4333a94
---
vlc-android/res/layout/activity_media_list_tv.xml | 5 -----
vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt | 3 ++-
vlc-android/src/org/videolan/vlc/gui/tv/details/MediaListActivity.kt | 1 -
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/vlc-android/res/layout/activity_media_list_tv.xml b/vlc-android/res/layout/activity_media_list_tv.xml
index 24ec41ba6..bda73a2c6 100644
--- a/vlc-android/res/layout/activity_media_list_tv.xml
+++ b/vlc-android/res/layout/activity_media_list_tv.xml
@@ -33,10 +33,6 @@
name="totalTime"
type="String" />
- <variable
- name="imageWidth"
- type="int" />
-
</data>
@@ -63,7 +59,6 @@
android:layout_height="90dp"
android:layout_marginStart="@dimen/tv_overscan_horizontal"
android:layout_marginBottom="8dp"
- app:imageWidth="@{imageWidth}"
app:layout_constraintBottom_toBottomOf="@+id/frameLayout"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
index 4611dbe15..8bdce7b27 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
@@ -31,6 +31,7 @@ import org.videolan.medialibrary.media.MediaLibraryItem
import org.videolan.vlc.BR
import org.videolan.vlc.R
import org.videolan.vlc.VLCApplication
+import org.videolan.vlc.databinding.ActivityMediaListTvBinding
import org.videolan.vlc.databinding.AudioBrowserCardItemBinding
import org.videolan.vlc.databinding.MediaBrowserTvItemBinding
import org.videolan.vlc.gui.tv.TvUtil
@@ -145,7 +146,7 @@ fun placeHolderView(v: View, item: MediaLibraryItem?) {
}
}
-fun isForTV(binding: ViewDataBinding?) = (binding is MediaBrowserTvItemBinding) || binding is MediaBrowserTvItemBinding
+fun isForTV(binding: ViewDataBinding?) = (binding is MediaBrowserTvItemBinding) || binding is MediaBrowserTvItemBinding || binding is ActivityMediaListTvBinding
@MainThread
@BindingAdapter("placeholderImage")
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/details/MediaListActivity.kt b/vlc-android/src/org/videolan/vlc/gui/tv/details/MediaListActivity.kt
index df0e355c5..01c725efe 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/details/MediaListActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/details/MediaListActivity.kt
@@ -75,7 +75,6 @@ class MediaListActivity : BaseTvActivity(), ITVEventsHandler, CoroutineScope by
}
binding.totalTime = Tools.millisToString(item.tracks.sumByDouble { it.length.toDouble() }.toLong())
- binding.imageWidth = 90.dp
binding.play.setOnClickListener { TvUtil.playMedia(this, item.tracks.toMutableList()) }
More information about the Android
mailing list