Theme tweaks (3)

This commit is contained in:
Andrew Rabert 2019-12-21 15:07:18 -05:00
parent 97507a25a1
commit 572024da52
5 changed files with 45 additions and 63 deletions

View File

@ -88,6 +88,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
private TextView songTitleTextView;
private ImageView albumArtImageView;
private ImageView albumArtBackgroundView;
private View nowPlayingView;
private RecyclerView playlistView;
private TextView positionTextView;
private TextView durationTextView;
@ -155,6 +156,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
songTitleTextView = rootView.findViewById(R.id.download_song_title);
albumArtImageView = rootView.findViewById(R.id.download_album_art_image);
albumArtBackgroundView = rootView.findViewById(R.id.download_album_art_background);
nowPlayingView = rootView.findViewById(R.id.now_playing_top);
positionTextView = rootView.findViewById(R.id.download_position);
durationTextView = rootView.findViewById(R.id.download_duration);
statusTextView = rootView.findViewById(R.id.download_status);
@ -937,9 +939,11 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
getImageLoader().loadImage(albumArtImageView, song, true, crossfade);
if (Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_BLURRED_BACKGROUND, true)) {
albumArtBackgroundView.setVisibility(ImageView.VISIBLE);
nowPlayingView.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.gradient));
getImageLoader().loadBlurImage(albumArtBackgroundView, song, true, crossfade);
} else {
albumArtBackgroundView.setVisibility(ImageView.GONE);
nowPlayingView.setBackgroundResource(0);
}
}

View File

@ -10,7 +10,7 @@
android:scaleType="centerCrop" />
<LinearLayout
android:background="@drawable/gradient"
android:id="@+id/now_playing_top"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
@ -70,10 +70,6 @@
android:layout_marginTop="6dp"
android:ellipsize="end"
android:maxLines="1"
android:shadowColor="@color/nowPlayingShadow"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="10.0"
android:textColor="?android:textColorSecondary" />
<TextView
@ -86,10 +82,6 @@
android:layout_marginRight="16dip"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:shadowColor="@color/nowPlayingShadow"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="10.0"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/download_overlay_buttons"

View File

@ -2,12 +2,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?attr/card_background"
android:orientation="vertical">
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="?attr/colorPrimary" />
android:layout_height="1px" />
<TextView
android:id="@+id/download_empty"

View File

@ -16,12 +16,8 @@
android:layout_centerVertical="true"
android:paddingBottom="4dip"
android:paddingLeft="8dip"
android:shadowColor="@color/nowPlayingShadow"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="10.0"
android:text="0:00"
android:textColor="?android:textColorPrimary"
android:textColor="?android:textColorSecondary"
android:textSize="12sp" />
<SeekBar
@ -43,11 +39,7 @@
android:layout_centerVertical="true"
android:paddingBottom="4dip"
android:paddingRight="8dip"
android:shadowColor="@color/nowPlayingShadow"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="10.0"
android:text="-:--"
android:textColor="?android:textColorPrimary"
android:textColor="?android:textColorSecondary"
android:textSize="12sp" />
</RelativeLayout>

View File

@ -2,52 +2,46 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/settings.appearance_title">
<PreferenceCategory android:title="@string/settings.theme_title">
<ListPreference
android:defaultValue="light"
android:entries="@array/themeNames"
android:entryValues="@array/themeValues"
android:key="theme"
android:title="@string/settings.theme_title" />
<ListPreference
android:defaultValue="light"
android:entries="@array/themeNames"
android:entryValues="@array/themeValues"
android:key="theme"
android:title="@string/settings.theme_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="fullScreen"
android:summary="@string/settings.theme_fullscreen_summary"
android:title="@string/settings.theme_fullscreen" />
<CheckBoxPreference
android:defaultValue="false"
android:key="fullScreen"
android:summary="@string/settings.theme_fullscreen_summary"
android:title="@string/settings.theme_fullscreen" />
</PreferenceCategory>
<CheckBoxPreference
android:defaultValue="false"
android:key="displayTrack"
android:summary="@string/settings.track_summary"
android:title="@string/settings.track_title" />
<PreferenceCategory android:title="@string/settings.appearance_title">
<CheckBoxPreference
android:defaultValue="false"
android:key="hideWidget"
android:summary="@string/settings.hide_widget_summary"
android:title="@string/settings.hide_widget_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="displayTrack"
android:summary="@string/settings.track_summary"
android:title="@string/settings.track_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="customSortEnabled"
android:summary="@string/settings.custom_sort_summary"
android:title="@string/settings.custom_sort" />
<CheckBoxPreference
android:defaultValue="false"
android:key="hideWidget"
android:summary="@string/settings.hide_widget_summary"
android:title="@string/settings.hide_widget_title" />
<CheckBoxPreference
android:defaultValue="true"
android:key="largeAlbumArt"
android:summary="@string/settings.large_album_art_summary"
android:title="@string/settings.large_album_art" />
<CheckBoxPreference
android:defaultValue="true"
android:key="customSortEnabled"
android:summary="@string/settings.custom_sort_summary"
android:title="@string/settings.custom_sort" />
<CheckBoxPreference
android:defaultValue="true"
android:key="largeAlbumArt"
android:summary="@string/settings.large_album_art_summary"
android:title="@string/settings.large_album_art" />
<CheckBoxPreference
android:defaultValue="true"
android:key="blurredBackground"
android:summary="@string/settings.blurred_background_summary"
android:title="@string/settings.blurred_background" />
</PreferenceCategory>
<CheckBoxPreference
android:defaultValue="true"
android:key="blurredBackground"
android:summary="@string/settings.blurred_background_summary"
android:title="@string/settings.blurred_background" />
</PreferenceScreen>