diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-03-10 08:02:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 08:02:34 +0100 |
commit | 393a8cebd3f26b6a1edae71f33e25d5c9cf42ded (patch) | |
tree | df69719b2cee6ecb12dd17f360f29e5e9487cabf /app/src/main/java/de/danoeh/antennapod | |
parent | b18e5f0de61bff72a2fc60910418769f7de145e9 (diff) | |
download | AntennaPod-393a8cebd3f26b6a1edae71f33e25d5c9cf42ded.zip |
Remove last few usages of Iconify (#6977)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
6 files changed, 11 insertions, 32 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java index 28b47c570..8e840885b 100644 --- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java +++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java @@ -6,9 +6,6 @@ import android.content.Intent; import android.os.StrictMode; import com.google.android.material.color.DynamicColors; -import com.joanzapata.iconify.Iconify; -import com.joanzapata.iconify.fonts.FontAwesomeModule; -import com.joanzapata.iconify.fonts.MaterialModule; import de.danoeh.antennapod.activity.SplashActivity; import de.danoeh.antennapod.config.ApplicationCallbacksImpl; @@ -55,9 +52,6 @@ public class PodcastApp extends Application { ClientConfigurator.initialize(this); PreferenceUpgrader.checkUpgrades(this); - Iconify.with(new FontAwesomeModule()); - Iconify.with(new MaterialModule()); - SPAUtil.sendSPAppsQueryFeedsIntent(this); EventBus.builder() .addIndex(new ApEventBusIndex()) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java index 08d7cbefd..3dad75e59 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java @@ -17,7 +17,6 @@ import de.danoeh.antennapod.model.download.DownloadError; import de.danoeh.antennapod.model.download.DownloadResult; import de.danoeh.antennapod.model.feed.Feed; import de.danoeh.antennapod.model.feed.FeedMedia; -import de.danoeh.antennapod.ui.common.ThemeUtils; import de.danoeh.antennapod.view.viewholder.DownloadLogItemViewHolder; import java.util.ArrayList; @@ -74,19 +73,16 @@ public class DownloadLogAdapter extends BaseAdapter { } if (status.isSuccessful()) { - holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_green)); - holder.icon.setText("{fa-check-circle}"); + holder.icon.setImageResource(R.drawable.ic_check); holder.icon.setContentDescription(context.getString(R.string.download_successful)); holder.secondaryActionButton.setVisibility(View.INVISIBLE); holder.reason.setVisibility(View.GONE); holder.tapForDetails.setVisibility(View.GONE); } else { if (status.getReason() == DownloadError.ERROR_PARSER_EXCEPTION_DUPLICATE) { - holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_yellow)); - holder.icon.setText("{fa-exclamation-circle}"); + holder.icon.setImageResource(R.drawable.ic_info); } else { - holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_red)); - holder.icon.setText("{fa-times-circle}"); + holder.icon.setImageResource(R.drawable.ic_error); } holder.icon.setContentDescription(context.getString(R.string.error_label)); holder.reason.setText(DownloadErrorLabel.from(status.getReason())); diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java index 4d9c526c0..64b85a94e 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java @@ -256,9 +256,8 @@ public class ProxyDialog { TypedArray res = context.getTheme().obtainStyledAttributes(new int[] { android.R.attr.textColorPrimary }); int textColorPrimary = res.getColor(0, 0); res.recycle(); - String checking = context.getString(R.string.proxy_checking); txtvMessage.setTextColor(textColorPrimary); - txtvMessage.setText("{fa-circle-o-notch spin} " + checking); + txtvMessage.setText(R.string.proxy_checking); txtvMessage.setVisibility(View.VISIBLE); disposable = Completable.create(emitter -> { String type = (String) spType.getSelectedItem(); @@ -300,15 +299,13 @@ public class ProxyDialog { .subscribe( () -> { txtvMessage.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_green)); - String message = String.format("%s %s", "{fa-check}", - context.getString(R.string.proxy_test_successful)); - txtvMessage.setText(message); + txtvMessage.setText(R.string.proxy_test_successful); setTestRequired(false); }, error -> { error.printStackTrace(); txtvMessage.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_red)); - String message = String.format("%s %s: %s", "{fa-close}", + String message = String.format("%s: %s", context.getString(R.string.proxy_test_failed), error.getMessage()); txtvMessage.setText(message); setTestRequired(true); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java index 8020235b9..b48e99240 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java @@ -24,7 +24,6 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.google.android.material.appbar.MaterialToolbar; import com.google.android.material.snackbar.Snackbar; -import com.joanzapata.iconify.Iconify; import com.leinardi.android.speeddial.SpeedDialView; import org.apache.commons.lang3.StringUtils; @@ -445,9 +444,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem viewBinding.header.txtvFailure.setVisibility(View.GONE); } if (!feed.getPreferences().getKeepUpdated()) { - viewBinding.header.txtvUpdatesDisabled.setText("{md-pause-circle-outline} " - + this.getString(R.string.updates_disabled_label)); - Iconify.addIcons(viewBinding.header.txtvUpdatesDisabled); + viewBinding.header.txtvUpdatesDisabled.setText(R.string.updates_disabled_label); viewBinding.header.txtvUpdatesDisabled.setVisibility(View.VISIBLE); } else { viewBinding.header.txtvUpdatesDisabled.setVisibility(View.GONE); @@ -457,9 +454,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem if (feed.getItemFilter() != null) { FeedItemFilter filter = feed.getItemFilter(); if (filter.getValues().length > 0) { - viewBinding.header.txtvInformation.setText("{md-info-outline} " - + this.getString(R.string.filtered_label)); - Iconify.addIcons(viewBinding.header.txtvInformation); + viewBinding.header.txtvInformation.setText(R.string.filtered_label); viewBinding.header.txtvInformation.setOnClickListener(l -> FeedItemFilterDialog.newInstance(feed).show(getChildFragmentManager(), null)); viewBinding.header.txtvInformation.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadLogItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadLogItemViewHolder.java index 578e1b149..ffb679830 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadLogItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadLogItemViewHolder.java @@ -9,7 +9,6 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; -import com.joanzapata.iconify.widget.IconTextView; import de.danoeh.antennapod.R; import de.danoeh.antennapod.ui.common.CircularProgressBar; @@ -17,7 +16,7 @@ public class DownloadLogItemViewHolder extends RecyclerView.ViewHolder { public final View secondaryActionButton; public final ImageView secondaryActionIcon; public final CircularProgressBar secondaryActionProgress; - public final IconTextView icon; + public final ImageView icon; public final TextView title; public final TextView status; public final TextView reason; @@ -26,7 +25,7 @@ public class DownloadLogItemViewHolder extends RecyclerView.ViewHolder { public DownloadLogItemViewHolder(Context context, ViewGroup parent) { super(LayoutInflater.from(context).inflate(R.layout.downloadlog_item, parent, false)); status = itemView.findViewById(R.id.status); - icon = itemView.findViewById(R.id.txtvIcon); + icon = itemView.findViewById(R.id.icon); reason = itemView.findViewById(R.id.txtvReason); tapForDetails = itemView.findViewById(R.id.txtvTapForDetails); secondaryActionButton = itemView.findViewById(R.id.secondaryActionButton); diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java index fe9b55a2e..9f0350b17 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java @@ -15,7 +15,6 @@ import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.elevation.SurfaceColors; -import com.joanzapata.iconify.Iconify; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; @@ -187,8 +186,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { if (media.getSize() > 0) { size.setText(Formatter.formatShortFileSize(activity, media.getSize())); } else if (NetworkUtils.isEpisodeHeadDownloadAllowed() && !media.checkedOnSizeButUnknown()) { - size.setText("{fa-spinner}"); - Iconify.addIcons(size); + size.setText(""); MediaSizeLoader.getFeedMediaSizeObservable(media).subscribe( sizeValue -> { if (sizeValue > 0) { |