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 | |
parent | b18e5f0de61bff72a2fc60910418769f7de145e9 (diff) | |
download | AntennaPod-393a8cebd3f26b6a1edae71f33e25d5c9cf42ded.zip |
Remove last few usages of Iconify (#6977)
Diffstat (limited to 'app/src')
13 files changed, 63 insertions, 107 deletions
diff --git a/app/src/main/assets/LICENSE_ANDROID_ICONIFY.txt b/app/src/main/assets/LICENSE_ANDROID_ICONIFY.txt deleted file mode 100644 index 954402c93..000000000 --- a/app/src/main/assets/LICENSE_ANDROID_ICONIFY.txt +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2015 Joan Zapata - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -It uses FontAwesome font, licensed under OFL 1.1, which is compatible -with this library's license. - - http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=OFL_plaintext&filename=OFL.txt diff --git a/app/src/main/assets/licenses.xml b/app/src/main/assets/licenses.xml index db5f93c1e..30f1e06d9 100644 --- a/app/src/main/assets/licenses.xml +++ b/app/src/main/assets/licenses.xml @@ -61,12 +61,6 @@ license="Simplified BSD" licenseText="LICENSE_GLIDE.txt" /> <library - name="Iconify" - author="Joan Zapata" - website="https://github.com/JoanZapata/android-iconify" - license="Apache 2.0" - licenseText="LICENSE_ANDROID_ICONIFY.txt" /> - <library name="jsoup" author="Jonathan Hedley" website="https://jsoup.org/" 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) { diff --git a/app/src/main/res/layout/authentication_dialog.xml b/app/src/main/res/layout/authentication_dialog.xml index f311fc1dd..0d54420d4 100644 --- a/app/src/main/res/layout/authentication_dialog.xml +++ b/app/src/main/res/layout/authentication_dialog.xml @@ -1,59 +1,61 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:padding="16dp"> + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="16dp"> <com.google.android.material.textfield.TextInputLayout - style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="8dp"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> <com.google.android.material.textfield.TextInputEditText - android:id="@+id/usernameEditText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/username_label" - android:lines="1"/> + android:id="@+id/usernameEditText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/username_label" + android:lines="1" /> </com.google.android.material.textfield.TextInputLayout> <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> <com.google.android.material.textfield.TextInputLayout - style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1"> + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> <com.google.android.material.textfield.TextInputEditText - android:id="@+id/passwordEditText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/password_label" - android:inputType="textPassword" - android:lines="1"/> + android:id="@+id/passwordEditText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/password_label" + android:inputType="textPassword" + android:lines="1" /> </com.google.android.material.textfield.TextInputLayout> - <com.joanzapata.iconify.widget.IconTextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/showPasswordButton" - android:text="{fa-eye}" - android:padding="8dp" - android:textColor="?android:attr/textColorPrimary" - android:background="?attr/selectableItemBackgroundBorderless" - android:alpha="0.6" - android:textSize="20sp" - android:layout_marginLeft="8dp" - android:layout_marginStart="8dp"/> + <ImageView + android:id="@+id/showPasswordButton" + android:layout_width="40dp" + android:layout_height="40dp" + android:src="@drawable/ic_eye" + android:layout_gravity="center_vertical" + android:padding="8dp" + android:textColor="?android:attr/textColorPrimary" + android:background="?attr/selectableItemBackgroundBorderless" + android:alpha="0.6" + android:textSize="20sp" + android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" /> </LinearLayout> -</LinearLayout>
\ No newline at end of file + +</LinearLayout> diff --git a/app/src/main/res/layout/downloadlog_item.xml b/app/src/main/res/layout/downloadlog_item.xml index 9ca19b531..2609f1134 100644 --- a/app/src/main/res/layout/downloadlog_item.xml +++ b/app/src/main/res/layout/downloadlog_item.xml @@ -28,13 +28,12 @@ android:orientation="horizontal" android:gravity="center_vertical"> - <com.joanzapata.iconify.widget.IconTextView - android:id="@+id/txtvIcon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" + <ImageView + android:id="@+id/icon" + android:layout_width="16dp" + android:layout_height="16dp" + android:importantForAccessibility="no" android:layout_marginEnd="4dp" - android:padding="2dp" - android:textSize="18sp" android:gravity="center" /> <TextView diff --git a/app/src/main/res/layout/edit_tags_dialog.xml b/app/src/main/res/layout/edit_tags_dialog.xml index b20facbf0..f4096e939 100644 --- a/app/src/main/res/layout/edit_tags_dialog.xml +++ b/app/src/main/res/layout/edit_tags_dialog.xml @@ -13,7 +13,7 @@ android:layout_height="wrap_content" android:text="@string/feed_folders_include_root" /> - <com.joanzapata.iconify.widget.IconTextView + <TextView android:id="@+id/commonTagsInfo" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml index 45f8e8ff8..9b6d190a8 100644 --- a/app/src/main/res/layout/feeditemlist_header.xml +++ b/app/src/main/res/layout/feeditemlist_header.xml @@ -140,7 +140,7 @@ </RelativeLayout> - <com.joanzapata.iconify.widget.IconTextView + <TextView android:id="@+id/txtvFailure" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/proxy_settings.xml b/app/src/main/res/layout/proxy_settings.xml index e4e57cc92..3467291eb 100644 --- a/app/src/main/res/layout/proxy_settings.xml +++ b/app/src/main/res/layout/proxy_settings.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="wrap_content" android:layout_width="match_parent" + android:layout_height="wrap_content" android:orientation="vertical" android:padding="16dp"> @@ -79,12 +79,12 @@ android:hint="@string/optional_hint" android:inputType="textPassword" /> - <com.joanzapata.iconify.widget.IconTextView + <TextView android:id="@+id/txtvMessage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:visibility="invisible" - android:gravity="center"/> + android:gravity="center" /> </LinearLayout> |