diff options
author | ByteHamster <info@bytehamster.com> | 2020-03-16 20:49:40 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-03-16 22:34:06 +0100 |
commit | 9f32b6cebf503961077f1f3d26735ff17c7219e0 (patch) | |
tree | 6eec81946a639ee66d046fa63ad241c2e954cbcf /app/src/main/java/de | |
parent | 15b1afa38b3ca1614296acc55ecc0535ac39df28 (diff) | |
download | AntennaPod-9f32b6cebf503961077f1f3d26735ff17c7219e0.zip |
Made icons black instead of grey
Since switching to the official Toolbar theme, the back arrow and
the overflow dots are black, too.
Diffstat (limited to 'app/src/main/java/de')
7 files changed, 17 insertions, 36 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index a5ae5e58c..c0ba75ba6 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -6,17 +6,9 @@ import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.content.res.TypedArray; -import android.graphics.Color; import android.graphics.PixelFormat; import android.os.Build; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.app.ActivityCompat; -import androidx.core.app.ActivityOptionsCompat; -import androidx.core.content.ContextCompat; -import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -27,11 +19,13 @@ import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; import android.widget.Toast; - +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.core.app.ActivityOptionsCompat; +import androidx.core.content.ContextCompat; import com.bumptech.glide.Glide; -import com.joanzapata.iconify.IconDrawable; -import com.joanzapata.iconify.fonts.FontAwesomeIcons; - import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.event.PlaybackPositionEvent; import de.danoeh.antennapod.core.feed.FeedItem; @@ -360,19 +354,6 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements menu.findItem(R.id.set_sleeptimer_item).setVisible(!controller.sleepTimerActive()); menu.findItem(R.id.disable_sleeptimer_item).setVisible(controller.sleepTimerActive()); - - if (this instanceof AudioplayerActivity) { - int[] attrs = {R.attr.action_bar_icon_color}; - TypedArray ta = obtainStyledAttributes(UserPreferences.getTheme(), attrs); - int textColor = ta.getColor(0, Color.GRAY); - ta.recycle(); - menu.findItem(R.id.audio_controls).setIcon(new IconDrawable(this, - FontAwesomeIcons.fa_sliders).color(textColor).actionBarSize()); - } else { - menu.findItem(R.id.audio_controls).setIcon(new IconDrawable(this, - FontAwesomeIcons.fa_sliders).color(0xffffffff).actionBarSize()); - } - return true; } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index 8fb7aa73f..a1a4e0374 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -382,6 +382,7 @@ public class VideoplayerActivity extends MediaplayerActivity { if (PictureInPictureUtil.supportsPictureInPicture(this)) { menu.findItem(R.id.player_go_to_picture_in_picture).setVisible(true); } + menu.findItem(R.id.audio_controls).setIcon(R.drawable.ic_sliders_white); return true; } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java index 307dabf14..b34963574 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java @@ -50,7 +50,7 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter { final FeedItem item = getItem(position); holder.bind(item); holder.dragHandle.setVisibility(View.GONE); - holder.secondaryActionIcon.setImageResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.content_discard)); + holder.secondaryActionIcon.setImageResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.ic_delete)); holder.secondaryActionButton.setOnClickListener(v -> itemAccess.onFeedItemSecondaryAction(item)); holder.hideSeparatorIfNecessary(); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java index 7831c6450..4d1ae76a2 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java @@ -24,7 +24,7 @@ public class DeleteActionButton extends ItemActionButton { @Override @AttrRes public int getDrawable() { - return R.attr.content_discard; + return R.attr.ic_delete; } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java index 16337b00d..0305a7d48 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -153,7 +153,7 @@ public class DownloadLogFragment extends ListFragment { super.onCreateOptionsMenu(menu, inflater); MenuItem clearHistory = menu.add(Menu.NONE, R.id.clear_history_item, Menu.CATEGORY_CONTAINER, R.string.clear_history_label); MenuItemCompat.setShowAsAction(clearHistory, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); - TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.content_discard}); + TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.ic_delete}); clearHistory.setIcon(drawables.getDrawable(0)); drawables.recycle(); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java index f57b83bb8..f9bc6642e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java @@ -114,7 +114,7 @@ public class PlaybackHistoryFragment extends Fragment implements AdapterView.OnI super.onCreateOptionsMenu(menu, inflater); MenuItem clearHistory = menu.add(Menu.NONE, R.id.clear_history_item, Menu.CATEGORY_CONTAINER, R.string.clear_history_label); MenuItemCompat.setShowAsAction(clearHistory, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); - TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.content_discard}); + TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.ic_delete}); clearHistory.setIcon(drawables.getDrawable(0)); drawables.recycle(); } diff --git a/app/src/main/java/de/danoeh/antennapod/view/CircularProgressBar.java b/app/src/main/java/de/danoeh/antennapod/view/CircularProgressBar.java index 4b3c51cfc..c6b50e728 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/CircularProgressBar.java +++ b/app/src/main/java/de/danoeh/antennapod/view/CircularProgressBar.java @@ -1,13 +1,14 @@ package de.danoeh.antennapod.view; import android.content.Context; -import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; import android.util.AttributeSet; import android.view.View; import androidx.annotation.Nullable; +import de.danoeh.antennapod.R; +import de.danoeh.antennapod.core.util.ThemeUtils; public class CircularProgressBar extends View { private static final float EPSILON = 0.005f; @@ -41,11 +42,9 @@ public class CircularProgressBar extends View { paintProgress.setStyle(Paint.Style.STROKE); paintProgress.setStrokeCap(Paint.Cap.ROUND); - int[] colorAttrs = new int[] { android.R.attr.textColorPrimary, android.R.attr.textColorSecondary }; - TypedArray a = getContext().obtainStyledAttributes(colorAttrs); - paintProgress.setColor(a.getColor(0, 0xffffffff)); - paintBackground.setColor(a.getColor(1, 0xffffffff)); - a.recycle(); + int color = ThemeUtils.getColorFromAttr(getContext(), R.attr.action_icon_color); + paintProgress.setColor(color); + paintBackground.setColor(color); } /** @@ -68,7 +67,7 @@ public class CircularProgressBar extends View { protected void onDraw(Canvas canvas) { super.onDraw(canvas); - float padding = getHeight() * 0.06f; + float padding = getHeight() * 0.07f; paintBackground.setStrokeWidth(getHeight() * 0.02f); paintProgress.setStrokeWidth(padding); RectF bounds = new RectF(padding, padding, getWidth() - padding, getHeight() - padding); |