Add material design icons
Includes RSS icon, sync notification icon, icons inside the apply actions screen, and the drag handle icon in the queue.
|
@ -2,6 +2,7 @@ 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;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
@ -126,9 +127,6 @@ public class EpisodesApplyActionFragment extends Fragment {
|
|||
textColor = ta.getColor(0, Color.GRAY);
|
||||
ta.recycle();
|
||||
|
||||
menu.findItem(R.id.sort).setIcon(new IconDrawable(getActivity(),
|
||||
FontAwesomeIcons.fa_sort).color(textColor).actionBarSize());
|
||||
|
||||
mSelectToggle = menu.findItem(R.id.select_toggle);
|
||||
mSelectToggle.setOnMenuItemClickListener(item -> {
|
||||
if (checkedIds.size() == episodes.size()) {
|
||||
|
@ -138,23 +136,27 @@ public class EpisodesApplyActionFragment extends Fragment {
|
|||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
menu.findItem(R.id.select_options).setIcon(new IconDrawable(getActivity(),
|
||||
FontAwesomeIcons.fa_caret_down).color(textColor).actionBarSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareOptionsMenu (Menu menu) {
|
||||
Icon icon;
|
||||
if(checkedIds.size() == episodes.size()) {
|
||||
icon = FontAwesomeIcons.fa_check_square_o;
|
||||
} else if(checkedIds.size() == 0) {
|
||||
icon = FontAwesomeIcons.fa_square_o;
|
||||
} else {
|
||||
icon = FontAwesomeIcons.fa_minus_square_o;
|
||||
}
|
||||
mSelectToggle.setIcon(new IconDrawable(getActivity(), icon).color(textColor).actionBarSize());
|
||||
/*
|
||||
* 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;
|
||||
|
||||
// Get Drawable from attribute
|
||||
TypedArray a = getActivity().obtainStyledAttributes(icon);
|
||||
Drawable iconDrawable = a.getDrawable(0);
|
||||
a.recycle();
|
||||
|
||||
// Set icon
|
||||
mSelectToggle.setIcon(iconDrawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,17 +12,19 @@
|
|||
android:layout_height="@dimen/listitem_threeline_height"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
tools:background="@android:color/darker_gray" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/drag_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginLeft="-16dp"
|
||||
android:layout_marginRight="-20dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="-16dp"
|
||||
android:layout_marginRight="-72dp"
|
||||
android:layout_marginEnd="-72dp"
|
||||
android:contentDescription="@string/drag_handle_content_description"
|
||||
android:scaleType="fitXY"
|
||||
android:src="?attr/dragview_background"
|
||||
|
@ -32,26 +34,22 @@
|
|||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp">
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp">
|
||||
<TextView
|
||||
android:id="@+id/txtvPlaceholder"
|
||||
android:layout_width="@dimen/thumbnail_length_queue_item"
|
||||
android:layout_height="@dimen/thumbnail_length_queue_item"
|
||||
android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
|
||||
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:background="@color/light_gray"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"/>
|
||||
<ImageView
|
||||
android:id="@+id/imgvCover"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_alignLeft="@id/txtvPlaceholder"
|
||||
android:layout_alignTop="@id/txtvPlaceholder"
|
||||
android:layout_alignRight="@id/txtvPlaceholder"
|
||||
android:layout_alignBottom="@id/txtvPlaceholder"
|
||||
android:layout_width="@dimen/thumbnail_length_queue_item"
|
||||
android:layout_height="@dimen/thumbnail_length_queue_item"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/cover_label"
|
||||
tools:src="@drawable/ic_stat_antenna_default"
|
||||
tools:background="@android:color/holo_green_dark"/>
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
<item
|
||||
android:id="@+id/sort"
|
||||
android:icon="?attr/ic_sort"
|
||||
android:title="@string/sort"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item android:id="@+id/sort_title"
|
||||
android:title="@string/sort_title"/>
|
||||
<item android:id="@+id/sort_title_a_z"
|
||||
android:title="@string/sort_title_a_z"/>
|
||||
<item android:id="@+id/sort_title_z_a"
|
||||
|
@ -24,19 +23,13 @@
|
|||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/select_toggle"
|
||||
android:title="@string/select_all_label"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/select_options"
|
||||
android:title="@string/all_label"
|
||||
android:icon="?attr/ic_filter"
|
||||
android:title="@string/filter"
|
||||
app:showAsAction="always">
|
||||
|
||||
<menu>
|
||||
<item android:id="@+id/select_label"
|
||||
android:title="@string/select_label"/>
|
||||
<item android:id="@+id/check_all"
|
||||
android:title="@string/all_label"/>
|
||||
<item android:id="@+id/check_none"
|
||||
|
@ -52,4 +45,8 @@
|
|||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/select_toggle"
|
||||
android:title="@string/select_all_label"
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
||||
|
|
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 584 B |
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 727 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 746 B |
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 197 B |
After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 259 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 658 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 517 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 910 B |
After Width: | Height: | Size: 407 B |
After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 475 B |
After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 582 B |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 853 B |
Before Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 809 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 580 B |
After Width: | Height: | Size: 514 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 705 B |
After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 498 B |
|
@ -46,6 +46,10 @@
|
|||
<attr name="ic_unfav" format="reference"/>
|
||||
<attr name="ic_sleep" format="reference"/>
|
||||
<attr name="ic_sleep_off" format="reference"/>
|
||||
<attr name="ic_check_box" format="reference"/>
|
||||
<attr name="ic_check_box_outline" format="reference"/>
|
||||
<attr name="ic_indeterminate_check_box" format="reference"/>
|
||||
<attr name="ic_sort" format="reference"/>
|
||||
|
||||
<!-- Used in itemdescription -->
|
||||
<attr name="non_transparent_background" format="reference"/>
|
||||
|
|
|
@ -538,6 +538,7 @@
|
|||
<string name="search_itunes_label">Search iTunes</string>
|
||||
|
||||
<string name="select_label"><b>Select…</b></string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="all_label">All</string>
|
||||
<string name="selected_all_label">Selected all Episodes</string>
|
||||
<string name="none_label">None</string>
|
||||
|
|
|
@ -53,7 +53,10 @@
|
|||
<item name="attr/ic_filter">@drawable/ic_filter_grey600_24dp</item>
|
||||
<item name="attr/ic_sleep">@drawable/ic_sleep_grey600_24dp</item>
|
||||
<item name="attr/ic_sleep_off">@drawable/ic_sleep_off_grey600_24dp</item>
|
||||
|
||||
<item name="attr/ic_check_box">@drawable/ic_check_box_grey600_24dp</item>
|
||||
<item name="attr/ic_check_box_outline">@drawable/ic_check_box_outline_blank_grey600_24dp</item>
|
||||
<item name="attr/ic_indeterminate_check_box">@drawable/ic_indeterminate_check_box_grey600_24dp</item>
|
||||
<item name="attr/ic_sort">@drawable/ic_sort_grey600_24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.Dark" parent="Theme.AppCompat">
|
||||
|
@ -107,6 +110,10 @@
|
|||
<item name="attr/ic_filter">@drawable/ic_filter_white_24dp</item>
|
||||
<item name="attr/ic_sleep">@drawable/ic_sleep_white_24dp</item>
|
||||
<item name="attr/ic_sleep_off">@drawable/ic_sleep_off_white_24dp</item>
|
||||
<item name="attr/ic_check_box">@drawable/ic_check_box_white_24dp</item>
|
||||
<item name="attr/ic_check_box_outline">@drawable/ic_check_box_outline_blank_white_24dp</item>
|
||||
<item name="attr/ic_indeterminate_check_box">@drawable/ic_indeterminate_check_box_white_24dp</item>
|
||||
<item name="attr/ic_sort">@drawable/ic_sort_white_24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
|
@ -162,6 +169,10 @@
|
|||
<item name="attr/ic_filter">@drawable/ic_filter_grey600_24dp</item>
|
||||
<item name="attr/ic_sleep">@drawable/ic_sleep_grey600_24dp</item>
|
||||
<item name="attr/ic_sleep_off">@drawable/ic_sleep_off_grey600_24dp</item>
|
||||
<item name="attr/ic_check_box">@drawable/ic_check_box_grey600_24dp</item>
|
||||
<item name="attr/ic_check_box_outline">@drawable/ic_check_box_outline_blank_grey600_24dp</item>
|
||||
<item name="attr/ic_indeterminate_check_box">@drawable/ic_indeterminate_check_box_grey600_24dp</item>
|
||||
<item name="attr/ic_sort">@drawable/ic_sort_grey600_24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AppCompat.NoActionBar">
|
||||
|
@ -216,6 +227,10 @@
|
|||
<item name="attr/ic_filter">@drawable/ic_filter_white_24dp</item>
|
||||
<item name="attr/ic_sleep">@drawable/ic_sleep_white_24dp</item>
|
||||
<item name="attr/ic_sleep_off">@drawable/ic_sleep_off_white_24dp</item>
|
||||
<item name="attr/ic_check_box">@drawable/ic_check_box_white_24dp</item>
|
||||
<item name="attr/ic_check_box_outline">@drawable/ic_check_box_outline_blank_white_24dp</item>
|
||||
<item name="attr/ic_indeterminate_check_box">@drawable/ic_indeterminate_check_box_white_24dp</item>
|
||||
<item name="attr/ic_sort">@drawable/ic_sort_white_24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.VideoPlayer" parent="@style/Theme.AntennaPod.Dark">
|
||||
|
|