Remove last few usages of Iconify (#6977)

This commit is contained in:
ByteHamster 2024-03-10 08:02:34 +01:00 committed by GitHub
parent b18e5f0de6
commit 393a8cebd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 77 additions and 121 deletions

View File

@ -119,8 +119,6 @@ dependencies {
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation "com.joanzapata.iconify:android-iconify-fontawesome:$iconifyVersion"
implementation "com.joanzapata.iconify:android-iconify-material:$iconifyVersion"
implementation 'com.leinardi.android:speed-dial:3.2.0'
implementation 'com.github.ByteHamster:SearchPreference:v2.5.0'
implementation 'com.github.skydoves:balloon:1.5.3'

View File

@ -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

View File

@ -60,12 +60,6 @@
website="https://github.com/bumptech/glide"
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"

View File

@ -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())

View File

@ -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()));

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -7,17 +7,17 @@
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_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:lines="1" />
</com.google.android.material.textfield.TextInputLayout>
@ -27,10 +27,10 @@
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_weight="1"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordEditText"
@ -38,22 +38,24 @@
android:layout_height="wrap_content"
android:hint="@string/password_label"
android:inputType="textPassword"
android:lines="1"/>
android:lines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.joanzapata.iconify.widget.IconTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<ImageView
android:id="@+id/showPasswordButton"
android:text="{fa-eye}"
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"/>
android:layout_marginStart="8dp" />
</LinearLayout>
</LinearLayout>

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -32,7 +32,6 @@ project.ext {
eventbusVersion = "3.3.1"
rxAndroidVersion = "2.1.1"
rxJavaVersion = "2.2.2"
iconifyVersion = "2.2.2"
annimonStreamVersion = "1.2.2"
// Google Play build

View File

@ -0,0 +1,5 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:fillColor="?attr/action_icon_color" android:pathData="M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"/>
</vector>

View File

@ -194,7 +194,7 @@
<string name="select_all_above">Select all above</string>
<string name="select_all_below">Select all below</string>
<string name="filtered_label">Filtered</string>
<string name="refresh_failed_msg">{fa-exclamation-circle} Last refresh failed. Tap to view details.</string>
<string name="refresh_failed_msg">Last refresh failed. Tap to view details.</string>
<string name="open_podcast">Open podcast</string>
<string name="please_wait_for_data">Please wait until the data is loaded</string>
<string name="updates_disabled_label">Updates disabled</string>
@ -703,7 +703,7 @@
<string name="feed_tags_label">Tags</string>
<string name="feed_tags_summary">Change the tags of this podcast to help organize your subscriptions</string>
<string name="feed_folders_include_root">Show this podcast in main list</string>
<string name="multi_feed_common_tags_info">{fa-info-circle} Only common tags from all selected subscriptions are shown. Other tags stay unaffected.</string>
<string name="multi_feed_common_tags_info">Only common tags from all selected subscriptions are shown. Other tags stay unaffected.</string>
<string name="auto_download_settings_label">Auto download settings</string>
<string name="episode_filters_label">Episode filter</string>
<string name="episode_filters_description">List of terms used to decide if an episode should be included or excluded when auto downloading</string>
@ -723,7 +723,7 @@
<string name="statistics_expected_next_episode_any_day">Any day now</string>
<string name="statistics_expected_next_episode_unknown">Unknown</string>
<string name="statistics_view_all">View for all podcasts »</string>
<string name="wait_icon" translatable="false">{fa-spinner}</string>
<string name="wait_icon" translatable="false"></string>
<string name="edit_url_menu">Edit feed URL</string>
<string name="edit_url_confirmation_msg">Changing the RSS address can easily break the playback state and episode listings of the podcast. We do NOT recommend changing it and will NOT provide support if anything goes wrong. This cannot be undone. The broken subscription CANNOT be repaired by simply changing the address back. We suggest creating a backup before continuing.</string>

View File

@ -27,6 +27,4 @@ dependencies {
implementation "com.github.bumptech.glide:glide:$glideVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation "com.joanzapata.iconify:android-iconify-fontawesome:$iconifyVersion"
implementation "com.joanzapata.iconify:android-iconify-material:$iconifyVersion"
}

View File

@ -14,7 +14,7 @@
android:layout_weight="1"
android:text="@string/statistics_episodes_started_total" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/startedTotalLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -34,7 +34,7 @@
android:layout_weight="1"
android:text="@string/statistics_time_played" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/timePlayedLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -55,7 +55,7 @@
android:layout_weight="1"
android:text="@string/statistics_total_duration" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/totalDurationLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -75,7 +75,7 @@
android:layout_weight="1"
android:text="@string/statistics_episodes_on_device" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/onDeviceLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -95,7 +95,7 @@
android:layout_weight="1"
android:text="@string/statistics_space_used" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/spaceUsedLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -115,7 +115,7 @@
android:layout_weight="1"
android:text="@string/statistics_expected_next_episode" />
<com.joanzapata.iconify.widget.IconTextView
<TextView
android:id="@+id/expectedNextEpisodeLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"