Minimal visual improvement for the play pause fab

This commit is contained in:
Karim Abou Zeid 2016-01-17 19:15:49 +01:00
commit 4381b41938
2 changed files with 5 additions and 1 deletions

View file

@ -290,6 +290,7 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
float density = getResources().getDisplayMetrics().density; float density = getResources().getDisplayMetrics().density;
playingQueueCard.setCardElevation((6 * slide + 2) * density); playingQueueCard.setCardElevation((6 * slide + 2) * density);
playbackControlsFragment.playPauseFab.setElevation((2 * Math.max(0, (1 - (slide * 16))) + 2) * density);
} }
} }

View file

@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -118,6 +119,8 @@
android:layout_centerInParent="true" /> android:layout_centerInParent="true" />
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
app:pressedTranslationZ="2dp"
app:elevation="4dp"
android:id="@+id/player_play_pause_fab" android:id="@+id/player_play_pause_fab"
style="@style/PlayPauseFab" style="@style/PlayPauseFab"
android:layout_centerInParent="true" /> android:layout_centerInParent="true" />