Merge pull request #3976 from ByteHamster/fix-player-overlap

Fixed description overlapping mini player
This commit is contained in:
H. Lehmann 2020-03-29 15:23:17 +02:00 committed by GitHub
commit ec0255b743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -140,7 +140,7 @@ public class MainActivity extends CastEnabledActivity {
public void onSlide(@NonNull View view, float slideOffset) {
AudioPlayerFragment audioPlayer = (AudioPlayerFragment) getSupportFragmentManager()
.findFragmentByTag(AudioPlayerFragment.TAG);
float condensedSlideOffset = Math.max(0.0f, Math.min(0.1f, slideOffset - 0.5f)) / 0.1f;
float condensedSlideOffset = Math.max(0.0f, Math.min(0.2f, slideOffset - 0.2f)) / 0.2f;
audioPlayer.getExternalPlayerHolder().setAlpha(1 - condensedSlideOffset);
audioPlayer.getExternalPlayerHolder().setVisibility(
condensedSlideOffset > 0.99f ? View.GONE : View.VISIBLE);

View File

@ -31,7 +31,8 @@
android:layout_alignParentTop="true"
android:background="?android:attr/windowBackground"
tools:layout_height="@dimen/external_player_height"
tools:background="@android:color/holo_green_light" />
tools:background="@android:color/holo_green_light"
android:elevation="8dp"/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"

View File

@ -69,7 +69,7 @@
app:srcCompat="?attr/av_play"
android:scaleType="fitCenter"
android:padding="8dp"
tools:src="@drawable/ic_play_arrow_white_36dp"/>
tools:src="@drawable/ic_av_play_white_48dp"/>
</LinearLayout>