summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2018-01-10 15:24:34 +0100
committerGitHub <noreply@github.com>2018-01-10 15:24:34 +0100
commitbe569bfb14fa3ca749764221aaa0bfc20e79ff82 (patch)
tree886425388687e940710633a1841b0762444a8e5e /app/src/main
parent8969e1cbb6c8c3061fcf35c03b47664ef4887835 (diff)
parenteaf007ecac75445bc501eb4d9c799ddf9ccf6036 (diff)
downloadAntennaPod-be569bfb14fa3ca749764221aaa0bfc20e79ff82.zip
Merge pull request #2531 from AntennaPod/remove_nineoldandroids
Replace ViewHelper
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java9
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java5
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java8
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java5
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java3
5 files changed, 12 insertions, 18 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
index f12c8285a..6611cd35a 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
@@ -21,7 +21,6 @@ import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.joanzapata.iconify.Iconify;
-import com.nineoldandroids.view.ViewHelper;
import java.lang.ref.WeakReference;
@@ -129,9 +128,9 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
holder.statusUnread.setVisibility(View.VISIBLE);
}
if(item.isPlayed()) {
- ViewHelper.setAlpha(holder.content, 0.5f);
+ holder.content.setAlpha(0.5f);
} else {
- ViewHelper.setAlpha(holder.content, 1.0f);
+ holder.content.setAlpha(1.0f);
}
FeedMedia media = item.getMedia();
@@ -272,12 +271,12 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
@Override
public void onItemSelected() {
- ViewHelper.setAlpha(itemView, 0.5f);
+ itemView.setAlpha(0.5f);
}
@Override
public void onItemClear() {
- ViewHelper.setAlpha(itemView, 1.0f);
+ itemView.setAlpha(1.0f);
}
public FeedItem getFeedItem() { return item; }
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java
index 6907e467b..807a32d8a 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java
@@ -12,7 +12,6 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
-import com.nineoldandroids.view.ViewHelper;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.FeedItem;
@@ -87,9 +86,9 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
.into(holder.imageView);
if(item.isPlayed()) {
- ViewHelper.setAlpha(convertView, 0.5f);
+ convertView.setAlpha(0.5f);
} else {
- ViewHelper.setAlpha(convertView, 1.0f);
+ convertView.setAlpha(1.0f);
}
holder.title.setText(item.getTitle());
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
index f843ddb94..71d162645 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
@@ -17,8 +17,6 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
-import com.nineoldandroids.view.ViewHelper;
-
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
@@ -43,7 +41,7 @@ public class FeedItemlistAdapter extends BaseAdapter {
private boolean makePlayedItemsTransparent;
private final ActionButtonUtils actionButtonUtils;
- public static final int SELECTION_NONE = -1;
+ private static final int SELECTION_NONE = -1;
private final int playingBackGroundColor;
private final int normalBackGroundColor;
@@ -145,9 +143,9 @@ public class FeedItemlistAdapter extends BaseAdapter {
holder.statusUnread.setVisibility(View.INVISIBLE);
}
if(item.isPlayed() && makePlayedItemsTransparent) {
- ViewHelper.setAlpha(convertView, 0.5f);
+ convertView.setAlpha(0.5f);
} else {
- ViewHelper.setAlpha(convertView, 1.0f);
+ convertView.setAlpha(1.0f);
}
String pubDateStr = DateUtils.formatAbbrev(context, item.getPubDate());
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
index 2684dcccd..8eebc919a 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
@@ -24,7 +24,6 @@ import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.joanzapata.iconify.Iconify;
-import com.nineoldandroids.view.ViewHelper;
import org.apache.commons.lang3.ArrayUtils;
@@ -198,12 +197,12 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
@Override
public void onItemSelected() {
- ViewHelper.setAlpha(itemView, 0.5f);
+ itemView.setAlpha(0.5f);
}
@Override
public void onItemClear() {
- ViewHelper.setAlpha(itemView, 1.0f);
+ itemView.setAlpha(1.0f);
}
public void bind(FeedItem item) {
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java
index 8e1aa24e0..beb62b3bb 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java
@@ -11,7 +11,6 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
-import com.nineoldandroids.view.ViewHelper;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.Feed;
@@ -97,7 +96,7 @@ public class SearchlistAdapter extends BaseAdapter {
holder.subtitle.setText(result.getSubtitle());
}
- ViewHelper.setAlpha(convertView, item.isPlayed() ? 0.5f : 1.0f);
+ convertView.setAlpha(item.isPlayed() ? 0.5f : 1.0f);
Glide.with(context)
.load(item.getFeed().getImageLocation())