diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-26 18:48:43 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-26 18:48:43 +0100 |
commit | 748a6c274567b0280ed8fc109bac6fc58f522998 (patch) | |
tree | 888f5aa10222ba5af160214ef96863e37d71c403 /app/src/main/java/de/danoeh/antennapod/dialog | |
parent | c80ee1b28252155d22d2ca98d246cbba2c3a31e4 (diff) | |
download | AntennaPod-748a6c274567b0280ed8fc109bac6fc58f522998.zip |
Minor changes
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index 6432ebd4e..fdd49e895 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -1,7 +1,6 @@ package de.danoeh.antennapod.dialog; import android.content.res.TypedArray; -import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v4.app.ActivityCompat; @@ -18,10 +17,6 @@ import android.widget.Button; import android.widget.ListView; import android.widget.Toast; -import com.joanzapata.iconify.Icon; -import com.joanzapata.iconify.IconDrawable; -import com.joanzapata.iconify.fonts.FontAwesomeIcons; - import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -122,11 +117,6 @@ public class EpisodesApplyActionFragment extends Fragment { super.onCreateOptionsMenu(menu, inflater); inflater.inflate(R.menu.episodes_apply_action_options, menu); - int[] attrs = { android.R.attr.textColor }; - TypedArray ta = getActivity().obtainStyledAttributes(attrs); - textColor = ta.getColor(0, Color.GRAY); - ta.recycle(); - mSelectToggle = menu.findItem(R.id.select_toggle); mSelectToggle.setOnMenuItemClickListener(item -> { if (checkedIds.size() == episodes.size()) { @@ -140,22 +130,21 @@ public class EpisodesApplyActionFragment extends Fragment { @Override public void onPrepareOptionsMenu (Menu menu) { - /* - * Prepare icon for select toggle button - */ + // Prepare icon for select toggle button - // Find icon attribute int[] icon = new int[1]; - if(checkedIds.size() == episodes.size()) icon[0] = R.attr.ic_check_box; - else if(checkedIds.size() == 0) icon[0] = R.attr.ic_check_box_outline; - else icon[0] = R.attr.ic_indeterminate_check_box; + if (checkedIds.size() == episodes.size()) { + icon[0] = R.attr.ic_check_box; + } else if (checkedIds.size() == 0) { + icon[0] = R.attr.ic_check_box_outline; + } else { + icon[0] = R.attr.ic_indeterminate_check_box; + } - // Get Drawable from attribute TypedArray a = getActivity().obtainStyledAttributes(icon); Drawable iconDrawable = a.getDrawable(0); a.recycle(); - // Set icon mSelectToggle.setIcon(iconDrawable); } |