Fix background gradient when changing themes
This commit is contained in:
parent
4eac05e57f
commit
f623ad2b63
|
@ -87,7 +87,8 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
|
||||||
private TextView emptyTextView;
|
private TextView emptyTextView;
|
||||||
private TextView songTitleTextView;
|
private TextView songTitleTextView;
|
||||||
private ImageView albumArtImageView;
|
private ImageView albumArtImageView;
|
||||||
private ImageView albumArtBackgroundView;
|
private View albumArtBackgroundView;
|
||||||
|
private ImageView albumArtBackgroundImageView;
|
||||||
private View nowPlayingView;
|
private View nowPlayingView;
|
||||||
private RecyclerView playlistView;
|
private RecyclerView playlistView;
|
||||||
private TextView positionTextView;
|
private TextView positionTextView;
|
||||||
|
@ -156,6 +157,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
|
||||||
songTitleTextView = rootView.findViewById(R.id.download_song_title);
|
songTitleTextView = rootView.findViewById(R.id.download_song_title);
|
||||||
albumArtImageView = rootView.findViewById(R.id.download_album_art_image);
|
albumArtImageView = rootView.findViewById(R.id.download_album_art_image);
|
||||||
albumArtBackgroundView = rootView.findViewById(R.id.download_album_art_background);
|
albumArtBackgroundView = rootView.findViewById(R.id.download_album_art_background);
|
||||||
|
albumArtBackgroundImageView = rootView.findViewById(R.id.download_album_art_background_image);
|
||||||
nowPlayingView = rootView.findViewById(R.id.now_playing_top);
|
nowPlayingView = rootView.findViewById(R.id.now_playing_top);
|
||||||
positionTextView = rootView.findViewById(R.id.download_position);
|
positionTextView = rootView.findViewById(R.id.download_position);
|
||||||
durationTextView = rootView.findViewById(R.id.download_duration);
|
durationTextView = rootView.findViewById(R.id.download_duration);
|
||||||
|
@ -939,11 +941,9 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
|
||||||
getImageLoader().loadImage(albumArtImageView, song, true, crossfade);
|
getImageLoader().loadImage(albumArtImageView, song, true, crossfade);
|
||||||
if (Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_BLURRED_BACKGROUND, true)) {
|
if (Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_BLURRED_BACKGROUND, true)) {
|
||||||
albumArtBackgroundView.setVisibility(ImageView.VISIBLE);
|
albumArtBackgroundView.setVisibility(ImageView.VISIBLE);
|
||||||
nowPlayingView.setBackgroundResource(DrawableTint.getDrawableRes(context, R.attr.gradient));
|
getImageLoader().loadBlurImage(albumArtBackgroundImageView, song, true, crossfade);
|
||||||
getImageLoader().loadBlurImage(albumArtBackgroundView, song, true, crossfade);
|
|
||||||
} else {
|
} else {
|
||||||
albumArtBackgroundView.setVisibility(ImageView.GONE);
|
albumArtBackgroundView.setVisibility(ImageView.GONE);
|
||||||
nowPlayingView.setBackgroundResource(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,22 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<net.nullsum.audinaut.view.RecyclingImageView
|
<FrameLayout
|
||||||
android:id="@+id/download_album_art_background"
|
android:id="@+id/download_album_art_background"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" >
|
||||||
android:scaleType="centerCrop" />
|
|
||||||
|
<net.nullsum.audinaut.view.RecyclingImageView
|
||||||
|
android:id="@+id/download_album_art_background_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="centerCrop" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?gradient" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/now_playing_top"
|
android:id="@+id/now_playing_top"
|
||||||
|
|
Loading…
Reference in New Issue