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 TextView songTitleTextView;
private ImageView albumArtImageView; private ImageView albumArtImageView;
private ImageView albumArtBackgroundView; private ImageView albumArtBackgroundView;
private View nowPlayingView;
private RecyclerView playlistView; private RecyclerView playlistView;
private TextView positionTextView; private TextView positionTextView;
private TextView durationTextView; private TextView durationTextView;
@ -155,6 +156,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);
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);
statusTextView = rootView.findViewById(R.id.download_status); statusTextView = rootView.findViewById(R.id.download_status);
@ -937,9 +939,11 @@ 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.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.gradient));
getImageLoader().loadBlurImage(albumArtBackgroundView, song, true, crossfade); getImageLoader().loadBlurImage(albumArtBackgroundView, song, true, crossfade);
} else { } else {
albumArtBackgroundView.setVisibility(ImageView.GONE); albumArtBackgroundView.setVisibility(ImageView.GONE);
nowPlayingView.setBackgroundResource(0);
} }
} }

View File

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

View File

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

View File

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

View File

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