Skip to content
Snippets Groups Projects
Commit 5446274f authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Implement the default thumbnails for audio on TV and video on mobile

parent 64737eec
No related branches found
No related tags found
1 merge request!1827Improve remote access + new icons integration
Pipeline #435041 canceled with stages
in 5 minutes and 24 seconds
<!--
~ *************************************************************************
~ ic_no_artwork_big.xml
~ **************************************************************************
~ Copyright © 2020 VLC authors and VideoLAN
~ Author: Nicolas POMEPUY
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
~ ***************************************************************************
~
~
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="315dp"
android:height="315dp"
android:viewportWidth="168"
android:viewportHeight="168">
<path
android:pathData="m132,12 l-71.001,28.5c-5.307,2.604 -9,7.939 -9,14.25v21.25,40.251c-1.302,-0.26 -2.619,-0.252 -4,-0.252 -11.046,0 -20,8.954 -20,20 0,11.046 8.954,20 20,20 11.046,0 20,-8.954 20,-20L67.999,69.499l48,-19v49.75c-1.302,-0.26 -2.619,-0.244 -4,-0.244 -11.046,0 -20,8.954 -20,20 0,11.046 8.954,20 20,20 11.046,0 20,-8.954 20,-20v-76.001,-32z"
android:strokeWidth="4.5"
android:fillColor="#757575"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1" />
</vector>
<!--
~ *************************************************************************
~ ic_no_thumbnail_1610.xml
~ **************************************************************************
~ Copyright © 2021 VLC authors and VideoLAN
~ Author: Nicolas POMEPUY
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
~ ***************************************************************************
~
~
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="320dp"
android:height="200dp"
android:width="160dp"
android:height="100dp"
android:viewportWidth="160"
android:viewportHeight="100">
<path
android:pathData="M-0,0l160,0l0,100l-160,0z"
android:strokeWidth="0.304744"
android:fillColor="?attr/empty_background"
android:strokeColor="#00000000"/>
<path
android:pathData="m64,34c-2.533,0 -4.571,2.038 -4.571,4.572l0,22.857c0,2.533 2.039,4.572 4.571,4.572l32,0c2.533,0 4.571,-2.038 4.571,-4.572l0,-22.857 0,-4.572l-4.571,0 -2.857,0l4,8l-6.857,0l-4,-8l-3.429,0l4,8l-6.857,0l-4,-8l-3.429,0l4,8l-6.857,0l-4,-8z"
android:pathData="M-0,-0l160,0l0,100l-160,0z"
android:strokeLineJoin="round"
android:strokeWidth="0.333333"
android:fillColor="?attr/empty_foreground"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:strokeWidth="1"
android:fillColor="?attr/empty_background"
android:strokeLineCap="round"/>
<path
android:pathData="m64,34c-2.2,0 -4,1.8 -4,4l0,24c0,2.2 1.8,4 4,4l32,0c2.2,0 4,-1.8 4,-4l0,-26c0,-1.1 -0.9,-2 -2,-2L92,34l3.64,7.28c0.16,0.32 -0.08,0.72 -0.44,0.72l-3.96,0c-0.76,0 -1.46,-0.42 -1.78,-1.1l-3.46,-6.9l-4,0l3.64,7.28c0.16,0.32 -0.08,0.72 -0.44,0.72l-3.96,0c-0.76,0 -1.46,-0.42 -1.78,-1.1l-3.46,-6.9l-4,0l3.64,7.28c0.16,0.32 -0.08,0.72 -0.44,0.72l-3.96,0c-0.76,0 -1.46,-0.42 -1.8,-1.1l-3.44,-6.9zM64,39 L67.52,46l28.48,0l0,16l-32,0z"
android:strokeWidth="1"
android:fillColor="?attr/empty_foreground"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M0,0h96v96h-96z"
android:strokeLineJoin="round"
android:fillColor="?attr/background_default"
android:strokeLineCap="round"/>
<path
android:pathData="m56,20c-3.535,-0 -6.4,2.865 -6.4,6.4v3.2,23.63C47.405,51.463 44.621,50.4 41.6,50.4c-7.041,0 -12.8,5.759 -12.8,12.8 0,7.041 5.759,12.8 12.8,12.8 7.041,0 12.8,-5.759 12.8,-12.8V29.6h6.4c3.535,0 6.4,-2.865 6.4,-6.4V20ZM41.6,55.2c4.447,0 8,3.553 8,8 0,4.447 -3.553,8 -8,8 -4.447,0 -8,-3.553 -8,-8 0,-4.447 3.553,-8 8,-8z"
android:strokeWidth="1"
android:fillColor="?attr/player_icon_color"
android:strokeLineCap="round"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M0,0h48v48h-48z"
android:fillColor="?attr/background_default"/>
<path
android:pathData="M36,6 L17.8066,13.2773C16.7143,13.7522 16.0003,14.8267 16,16.0234V17,32.1015h-0.006c-0.3272,-0.067 -0.6603,-0.1 -0.9941,-0.1 -2.7614,0 -5,2.2385 -5,5C9.9999,39.7629 12.2386,42 15,42c2.7614,0 4.9999,-2.2371 4.9999,-4.9985V19.4019l12,-4.8008V28.103h-0.006c-0.3272,-0.066 -0.6603,-0.1 -0.9941,-0.1 -2.7614,0 -5,2.2385 -5,5 0,2.7614 2.2386,5 5,5 2.7614,0 5,-2.2386 5,-5z"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="?attr/player_icon_color"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
</vector>
......@@ -212,7 +212,7 @@ class AudioPlayerActivity : BaseTvActivity(),KeycodeListener {
val width = if (binding.albumCover.width > 0) binding.albumCover.width else this@AudioPlayerActivity.getScreenWidth()
val cover = withContext(Dispatchers.IO) { AudioUtil.readCoverBitmap(Uri.decode(currentCoverArt), width) }
if (cover == null) {
binding.albumCover.setImageResource(R.drawable.ic_no_artwork_big)
binding.albumCover.setImageResource(R.drawable.ic_song_big)
binding.background.clearColorFilter()
binding.background.setImageResource(0)
} else {
......
......@@ -49,7 +49,7 @@
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_no_artwork_big"
android:src="@drawable/ic_song_big"
app:layout_constraintBottom_toTopOf="@+id/media_title"
app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toStartOf="@+id/guideline8"
......
......@@ -46,7 +46,7 @@ class CoverMediaSwitcher(context: Context, attrs: AttributeSet) : AudioMediaSwit
if (cover != null) {
coverView.setImageBitmap(cover)
} else {
coverView.setImageDrawable(ContextCompat.getDrawable(v.context, R.drawable.ic_player_cover_audiotrack))
coverView.setImageDrawable(ContextCompat.getDrawable(v.context, R.drawable.ic_no_thumbnail_song))
}
trackInfoView?.visibility = if (Settings.showAudioTrackInfo) View.VISIBLE else View.GONE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment