diff options
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
5 files changed, 16 insertions, 22 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistDescriptionAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistDescriptionAdapter.java index 2ab96e84d..5ddb6407c 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistDescriptionAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistDescriptionAdapter.java @@ -95,7 +95,7 @@ public class FeedItemlistDescriptionAdapter extends ArrayAdapter<FeedItem> { holder.preview.setVisibility(View.GONE); holder.description.setTag(Boolean.FALSE); } else { - holder.description.setMaxLines(2000); + holder.description.setMaxLines(30); holder.description.setTag(Boolean.TRUE); holder.preview.setVisibility(item.getMedia() != null ? View.VISIBLE : View.GONE); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index ff0311ab6..7854f7aa9 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -196,7 +196,7 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> bindFeedView((NavDrawerData.FeedDrawerItem) item, (FeedHolder) holder); holder.itemView.setOnCreateContextMenuListener(itemAccess); } else { - bindFolderView((NavDrawerData.FolderDrawerItem) item, (FeedHolder) holder); + bindTagView((NavDrawerData.TagDrawerItem) item, (FeedHolder) holder); } } if (viewType != VIEW_TYPE_SECTION_DIVIDER) { @@ -327,16 +327,16 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> } } - private void bindFolderView(NavDrawerData.FolderDrawerItem folder, FeedHolder holder) { + private void bindTagView(NavDrawerData.TagDrawerItem tag, FeedHolder holder) { Activity context = activity.get(); if (context == null) { return; } - if (folder.isOpen) { + if (tag.isOpen) { holder.count.setVisibility(View.GONE); } Glide.with(context).clear(holder.image); - holder.image.setImageResource(R.drawable.ic_folder); + holder.image.setImageResource(R.drawable.ic_tag); holder.failure.setVisibility(View.GONE); } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/PlaybackStatisticsListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/PlaybackStatisticsListAdapter.java index 5fec5f063..26674b2b2 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/PlaybackStatisticsListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/PlaybackStatisticsListAdapter.java @@ -1,13 +1,12 @@ package de.danoeh.antennapod.adapter; -import android.content.Context; -import androidx.appcompat.app.AlertDialog; - +import androidx.fragment.app.Fragment; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.storage.StatisticsItem; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.DateFormatter; +import de.danoeh.antennapod.fragment.FeedStatisticsDialogFragment; import de.danoeh.antennapod.view.PieChartView; import java.util.Date; @@ -18,10 +17,12 @@ import java.util.List; */ public class PlaybackStatisticsListAdapter extends StatisticsListAdapter { + private final Fragment fragment; boolean countAll = true; - public PlaybackStatisticsListAdapter(Context context) { - super(context); + public PlaybackStatisticsListAdapter(Fragment fragment) { + super(fragment.getContext()); + this.fragment = fragment; } public void setCountAll(boolean countAll) { @@ -60,16 +61,9 @@ public class PlaybackStatisticsListAdapter extends StatisticsListAdapter { holder.value.setText(Converter.shortLocalizedDuration(context, time)); holder.itemView.setOnClickListener(v -> { - AlertDialog.Builder dialog = new AlertDialog.Builder(context); - dialog.setTitle(statsItem.feed.getTitle()); - dialog.setMessage(context.getString(R.string.statistics_details_dialog, - countAll ? statsItem.episodesStartedIncludingMarked : statsItem.episodesStarted, - statsItem.episodes, Converter.shortLocalizedDuration(context, - countAll ? statsItem.timePlayedCountAll : statsItem.timePlayed), - Converter.shortLocalizedDuration(context, statsItem.time))); - dialog.setPositiveButton(android.R.string.ok, null); - dialog.show(); + FeedStatisticsDialogFragment yourDialogFragment = FeedStatisticsDialogFragment.newInstance( + statsItem.feed.getId(), statsItem.feed.getTitle()); + yourDialogFragment.show(fragment.getChildFragmentManager().beginTransaction(), "DialogFragment"); }); } - } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java index 73f67d016..b637eb31d 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java @@ -219,7 +219,7 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription .load(); } else { new CoverLoader(mainActivityRef.get()) - .withResource(R.drawable.ic_folder) + .withResource(R.drawable.ic_tag) .withPlaceholderView(feedTitle, true) .withCoverView(imageView) .load(); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java index dedf8e5e6..a2b0e98c3 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java @@ -34,7 +34,7 @@ public class CancelDownloadActionButton extends ItemActionButton { FeedMedia media = item.getMedia(); DownloadRequester.getInstance().cancelDownload(context, media); if (UserPreferences.isEnableAutodownload()) { - item.setAutoDownload(false); + item.disableAutoDownload(); DBWriter.setFeedItem(item); } } |