Fixed album cover in landscape now playing screen

This commit is contained in:
Karim Abou Zeid 2015-12-23 23:25:05 +01:00
commit ff55c8edd0
7 changed files with 87 additions and 25 deletions

View file

@ -20,16 +20,22 @@
style="@style/Toolbar"
android:background="@android:color/transparent" />
<android.support.percent.PercentRelativeLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--suppress AndroidDomInspection -->
<fragment
android:id="@+id/player_album_cover_fragment"
class="com.kabouzeid.gramophone.ui.fragments.player.PlayerAlbumCoverFragment"
app:layout_aspectRatio="100%"
app:layout_heightPercent="100%" />
<com.kabouzeid.gramophone.views.HeightFitSquareLayout
android:id="@+id/cover_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/player_album_cover_fragment"
class="com.kabouzeid.gramophone.ui.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.kabouzeid.gramophone.views.HeightFitSquareLayout>
<com.sothree.slidinguppanel.SlidingUpPanelLayout android:id="@+id/player_sliding_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
@ -37,8 +43,8 @@
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toEndOf="@+id/player_album_cover_fragment"
android:layout_toRightOf="@+id/player_album_cover_fragment"
android:layout_toEndOf="@+id/cover_container"
android:layout_toRightOf="@+id/cover_container"
android:clickable="false"
android:focusable="true"
android:gravity="bottom"
@ -127,7 +133,7 @@
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</android.support.percent.PercentRelativeLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>

View file

@ -4,13 +4,20 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent">
android:background="@android:color/black">
<com.kabouzeid.gramophone.views.WidthFitSquareImageView
<ImageView
android:id="@+id/player_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription,UnusedAttribute" />
<!--<ImageView-->
<!--android:id="@+id/player_image_background"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:scaleType="centerCrop"-->
<!--tools:ignore="ContentDescription,UnusedAttribute" />-->
</FrameLayout>

View file

@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<com.kabouzeid.gramophone.views.SquareLayout
<com.kabouzeid.gramophone.views.WidthFitSquareLayout
android:id="@+id/album_cover_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.kabouzeid.gramophone.views.SquareLayout>
</com.kabouzeid.gramophone.views.WidthFitSquareLayout>
<fragment
android:id="@+id/playback_controls_fragment"