diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-15 09:05:34 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-15 09:05:34 +0300 |
| commit | 2122a9b494feaddd953b276b06d8b4d0515d0f27 (patch) | |
| tree | fb4295c93163b93b01ec480268e9accbf0b5405f /org.fox.ttrss/src/main/java | |
| parent | 6e1ea990c69f72ac0b3e49f46ce620aa8e873422 (diff) | |
drop no longer useful theme attributes in favor of drawable ids
Diffstat (limited to 'org.fox.ttrss/src/main/java')
3 files changed, 7 insertions, 19 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java index def61209..b37f7386 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java @@ -62,9 +62,7 @@ public abstract class BaseFeedlistFragment extends androidx.fragment.app.Fragmen text.setText(R.string.unread_only); ImageView icon = rowToggle.findViewById(R.id.icon); - TypedValue tv = new TypedValue(); - getActivity().getTheme().resolveAttribute(R.attr.ic_filter_variant, tv, true); - icon.setImageResource(tv.resourceId); + icon.setImageResource(R.drawable.baseline_filter_alt_24); final SwitchCompat rowSwitch = rowToggle.findViewById(R.id.row_switch); rowSwitch.setChecked(activity.getUnreadOnly()); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index 1d735490..34127013 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -376,10 +376,7 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt ImageView icon = v.findViewById(R.id.icon); if (icon != null) { - TypedValue tv = new TypedValue(); - - m_activity.getTheme().resolveAttribute(R.attr.ic_folder_outline, tv, true); - icon.setImageResource(tv.resourceId); + icon.setImageResource(R.drawable.baseline_folder_open_24); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 1e22f711..b0a3d2d3 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -830,11 +830,7 @@ public class HeadlinesFragment extends androidx.fragment.app.Fragment { m_activity.getTheme().resolveAttribute(R.attr.colorPrimary, tvPrimary, true); if (holder.markedView != null) { - TypedValue tv = new TypedValue(); - m_activity.getTheme().resolveAttribute(article.marked ? R.attr.ic_star : R.attr.ic_star_outline, tv, true); - - holder.markedView.setIconResource(tv.resourceId); - + holder.markedView.setIconResource(article.marked ? R.drawable.baseline_star_24 : R.drawable.baseline_star_outline_24); if (article.marked) holder.markedView.setIconTint(ColorStateList.valueOf(tvTertiary.data)); @@ -851,17 +847,14 @@ public class HeadlinesFragment extends androidx.fragment.app.Fragment { } if (holder.scoreView != null) { - TypedValue tv = new TypedValue(); - int scoreAttr = R.attr.ic_action_trending_flat; + int scoreDrawable = R.drawable.baseline_trending_flat_24; if (article.score > 0) - scoreAttr = R.attr.ic_action_trending_up; + scoreDrawable = R.drawable.baseline_trending_up_24; else if (article.score < 0) - scoreAttr = R.attr.ic_action_trending_down; - - m_activity.getTheme().resolveAttribute(scoreAttr, tv, true); + scoreDrawable = R.drawable.baseline_trending_down_24; - holder.scoreView.setIconResource(tv.resourceId); + holder.scoreView.setIconResource(scoreDrawable); if (article.score > Article.SCORE_HIGH) holder.scoreView.setIconTint(ColorStateList.valueOf(tvTertiary.data)); |