From 3cab62348a236f0b836f684f7c2aaa32a765cdc5 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sat, 24 Jul 2021 08:38:25 +0200 Subject: [PATCH] Removed highlighting of episode title --- .../java/de/danoeh/antennapod/fragment/CoverFragment.java | 4 +++- app/src/main/res/layout/cover_fragment.xml | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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 0dd97098e..9c9eee2aa 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java @@ -161,7 +161,9 @@ public class CoverFragment extends Fragment { int animUnit = 1500; if (lines > txtvEpisodeTitle.getMaxLines()) { ObjectAnimator verticalMarquee = ObjectAnimator.ofInt( - txtvEpisodeTitle, "scrollY", 0, txtvEpisodeTitle.getHeight()) + txtvEpisodeTitle, "scrollY", 0, (lines - txtvEpisodeTitle.getMaxLines()) * ( + (txtvEpisodeTitle.getHeight() - txtvEpisodeTitle.getPaddingTop() + - txtvEpisodeTitle.getPaddingBottom()) / txtvEpisodeTitle.getMaxLines())) .setDuration(lines * animUnit); ObjectAnimator fadeOut = ObjectAnimator.ofFloat( txtvEpisodeTitle, "alpha", 0); diff --git a/app/src/main/res/layout/cover_fragment.xml b/app/src/main/res/layout/cover_fragment.xml index 8333ded1e..548e55774 100644 --- a/app/src/main/res/layout/cover_fragment.xml +++ b/app/src/main/res/layout/cover_fragment.xml @@ -4,10 +4,10 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:squareImageView="http://schemas.android.com/apk/de.danoeh.antennapod" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/cover_fragment" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" - android:id="@+id/cover_fragment" android:padding="8dp" android:gravity="center"> @@ -57,7 +57,6 @@ android:id="@+id/txtvEpisodeTitle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:selectableItemBackground" android:ellipsize="none" android:gravity="center_horizontal" android:maxLines="2" @@ -125,6 +124,7 @@ android:text="@string/shownotes_label" android:textColor="?android:attr/textColorSecondary" android:textSize="16sp" /> + +