D9564: Add album cover art support.

Nicolas Fella noreply at phabricator.kde.org
Tue Jan 2 20:14:21 UTC 2018


nicolasfella added a comment.


  A propse:
  
  With the limited Spotify controls:
  F5614171: Screenshot_20180102-204527.jpg <https://phabricator.kde.org/F5614171>
  
  With full controls:
  F5614195: Screenshot_20180102-204342.jpg <https://phabricator.kde.org/F5614195>
  
  Without artwork:
  F5614200: Screenshot_20180102-210619.jpg <https://phabricator.kde.org/F5614200>
  
  The artwork has a fixed aspect ratio. In the first image the artwork uses the full width leaving space at the bottom. In the second image the height of the screen is fully used resulting in the artwork not using the full width.
  
  This is generated by the following activity_mpris.xml:
  
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:paddingLeft="25dp"
        android:paddingTop="25dip"
        android:paddingRight="25dip"
        android:paddingBottom="15dip"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_vertical">
    
        <ImageView
            android:id="@+id/album_art"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:layout_marginBottom="25dip"
            android:scaleType="fitCenter" />
    
        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/mpris_control" />
    </LinearLayout>

INLINE COMMENTS

> MprisActivity.java:203
> +        if (albumArt == null) {
> +            findViewById(R.id.album_art).setVisibility(View.INVISIBLE);
> +            ((ImageView) findViewById(R.id.album_art)).setImageBitmap(null);

View.GONE works better with my suggestion

REPOSITORY
  R225 KDE Connect - Android application

REVISION DETAIL
  https://phabricator.kde.org/D9564

To: mtijink, #kde_connect, #vdg
Cc: ngraham, nicolasfella, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20180102/7443f491/attachment.html>


More information about the KDEConnect mailing list