diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-25 00:34:33 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-25 00:34:33 +0100 |
commit | 3319dc7c0749e70dd5ec7e92e27646e9347898c6 (patch) | |
tree | c3aa9cb54137fbfc2b133bb0d7b98784f6295ebc /app | |
parent | 0eefa8c5412bf15c00fd83f318629377b4805c20 (diff) | |
download | AntennaPod-3319dc7c0749e70dd5ec7e92e27646e9347898c6.zip |
Remove palette
Diffstat (limited to 'app')
-rw-r--r-- | app/build.gradle | 1 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/cover_fragment.xml | 9 |
3 files changed, 7 insertions, 27 deletions
diff --git a/app/build.gradle b/app/build.gradle index f2888cf2f..55c1080ae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,7 +13,6 @@ dependencies { compile "com.android.support:appcompat-v7:$supportVersion" compile "com.android.support:design:$supportVersion" compile "com.android.support:gridlayout-v7:$supportVersion" - compile "com.android.support:palette-v7:$supportVersion" compile "com.android.support:percent:$supportVersion" compile "com.android.support:recyclerview-v7:$supportVersion" compile "org.apache.commons:commons-lang3:$commonslangVersion" diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java index 0ffdf4e51..a3e9723ea 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java @@ -1,9 +1,7 @@ package de.danoeh.antennapod.fragment; -import android.graphics.Bitmap; import android.os.Bundle; import android.support.v4.app.Fragment; -import android.support.v7.graphics.Palette; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -12,8 +10,6 @@ import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; -import com.bumptech.glide.request.animation.GlideAnimation; -import com.bumptech.glide.request.target.BitmapImageViewTarget; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.AudioplayerActivity.AudioplayerContentFragment; @@ -78,26 +74,10 @@ public class CoverFragment extends Fragment implements imgvCover.post(() -> { Glide.with(this) .load(media.getImageUri()) - .asBitmap() - .placeholder(R.color.light_gray) - .error(R.color.light_gray) .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) .dontAnimate() - .into(new BitmapImageViewTarget(imgvCover) { - @Override - public void onResourceReady(Bitmap bitmap, GlideAnimation anim) { - super.onResourceReady(bitmap, anim); - Palette.Builder builder = new Palette.Builder(bitmap); - builder.generate(palette -> { - Palette.Swatch swatch = palette.getMutedSwatch(); - if(swatch != null) { - root.setBackgroundColor(swatch.getRgb()); - txtvPodcastTitle.setTextColor(swatch.getTitleTextColor()); - txtvEpisodeTitle.setTextColor(swatch.getBodyTextColor()); - } - }); - } - }); + .fitCenter() + .into(imgvCover); }); } else { Log.w(TAG, "loadMediaInfo was called while media was null"); diff --git a/app/src/main/res/layout/cover_fragment.xml b/app/src/main/res/layout/cover_fragment.xml index 13cfb0add..9ad1ff9c6 100644 --- a/app/src/main/res/layout/cover_fragment.xml +++ b/app/src/main/res/layout/cover_fragment.xml @@ -5,8 +5,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/actionbar_gray"> + android:layout_height="match_parent"> <ImageView android:id="@+id/imgvCover" @@ -37,7 +36,8 @@ android:gravity="center" android:maxLines="2" android:ellipsize="end" - android:text="Podcast" /> + android:text="Podcast" + android:textColor="?android:attr/textColorSecondary" /> </LinearLayout> @@ -59,7 +59,8 @@ android:gravity="center" android:maxLines="2" android:ellipsize="end" - android:text="Episode" /> + android:text="Episode" + android:textColor="?android:attr/textColorPrimary" /> </LinearLayout> |