summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/downloaded_episodeslist_item.xml2
-rw-r--r--app/src/main/res/layout/episodes_apply_action_fragment.xml143
-rw-r--r--app/src/main/res/layout/simple_list_item_multiple_choice_on_start.xml33
-rw-r--r--app/src/main/res/menu/episodes_apply_action_speeddial.xml34
-rw-r--r--app/src/main/res/menu/opml_selection_options.xml4
-rw-r--r--app/src/main/res/values-w300dp/dimens-fabspeeddial.xml8
6 files changed, 117 insertions, 107 deletions
diff --git a/app/src/main/res/layout/downloaded_episodeslist_item.xml b/app/src/main/res/layout/downloaded_episodeslist_item.xml
index 66ae6c180..65a08251f 100644
--- a/app/src/main/res/layout/downloaded_episodeslist_item.xml
+++ b/app/src/main/res/layout/downloaded_episodeslist_item.xml
@@ -92,7 +92,7 @@
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:clickable="false"
- android:contentDescription="@string/remove_episode_lable"
+ android:contentDescription="@string/delete_episode_label"
android:focusable="false"
android:focusableInTouchMode="false"
android:src="?attr/content_discard"
diff --git a/app/src/main/res/layout/episodes_apply_action_fragment.xml b/app/src/main/res/layout/episodes_apply_action_fragment.xml
index e9a2e2e23..984e960d8 100644
--- a/app/src/main/res/layout/episodes_apply_action_fragment.xml
+++ b/app/src/main/res/layout/episodes_apply_action_fragment.xml
@@ -1,115 +1,50 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
-
- <LinearLayout
- android:id="@+id/bottomBar"
- android:layout_width="match_parent"
- android:layout_height="68dp"
- android:layout_alignParentBottom="true"
- android:gravity="center_vertical"
- android:orientation="horizontal"
- android:padding="4dp">
-
- <Button
- android:id="@+id/btnAddToQueue"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"
- android:drawableTop="?attr/content_new"
- android:text="@string/add_to_queue_label"
- android:textSize="10sp" />
-
- <View
- android:id="@+id/divider1"
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:layout_margin="4dp"
- android:background="?android:attr/listDivider"
- tools:background="@android:color/holo_red_dark" />
-
- <Button
- android:id="@+id/btnMarkAsPlayed"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"
- android:drawableTop="?attr/navigation_accept"
- android:text="@string/mark_read_label"
- android:textSize="10sp" />
-
- <View
- android:id="@+id/divider2"
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:layout_margin="4dp"
- android:background="?android:attr/listDivider"
- tools:background="@android:color/holo_red_dark" />
-
- <Button
- android:id="@+id/btnMarkAsUnplayed"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"
- android:drawableTop="?attr/navigation_cancel"
- android:text="@string/mark_unread_label"
- android:textSize="10sp" />
-
- <View
- android:id="@+id/divider3"
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:layout_margin="4dp"
- android:background="?android:attr/listDivider"
- tools:background="@android:color/holo_red_dark" />
-
- <Button
- android:id="@+id/btnDownload"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"
- android:drawableTop="?attr/av_download"
- android:text="@string/download_label"
- android:textSize="10sp" />
-
- <View
- android:id="@+id/divider4"
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:layout_margin="4dp"
- android:background="?android:attr/listDivider"
- tools:background="@android:color/holo_red_dark" />
-
- <Button
- android:id="@+id/btnDelete"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"
- android:drawableTop="?attr/content_discard"
- android:text="@string/remove_episode_lable"
- android:textSize="10sp" />
-
- </LinearLayout>
-
- <View
- android:id="@+id/divider"
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:layout_above="@id/bottomBar"
- android:background="?android:attr/listDivider"
- android:paddingBottom="4dp"
- tools:background="@android:color/holo_red_dark" />
-
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_above="@id/divider"/>
+ android:layout_alignParentTop="true"
+ android:layout_marginTop="0dp" />
+
+ <com.leinardi.android.speeddial.SpeedDialOverlayLayout
+ android:id="@+id/fabSDOverlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ <!-- The FAB SpeedDial
+ 1. MUST be placed at the bottom of the layout xml to ensure it is at the front,
+ clickable on Pre-Lollipop devices (that do not support elevation).
+ See: https://stackoverflow.com/a/2614402
+ 2. ScrollView is needed to ensure the vertical list of speed dials are
+ accessible when screen height is small, eg., landscape mode on most phones.
+ -->
+ <ScrollView
+ android:id="@+id/fabSDScrollCtr"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:elevation="@dimen/sd_close_elevation"
+ tools:ignore="UnusedAttribute">
+ <!-- android:elevation:
+ 1. Needs to match the speed dial's minimal elevation,
+ or the speed dial can't be clicked at all
+ -->
+ <com.leinardi.android.speeddial.SpeedDialView
+ android:id="@+id/fabSD"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:sdMainFabClosedSrc="@drawable/ic_fab_edit"
+ app:sdOverlayLayout="@id/fabSDOverlay"
+ android:layout_marginEnd="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginBottom="16dp"
+ />
+ </ScrollView>
</RelativeLayout>
diff --git a/app/src/main/res/layout/simple_list_item_multiple_choice_on_start.xml b/app/src/main/res/layout/simple_list_item_multiple_choice_on_start.xml
new file mode 100644
index 000000000..3c03f71ea
--- /dev/null
+++ b/app/src/main/res/layout/simple_list_item_multiple_choice_on_start.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Based on simple_list_item_multiple_choice.xml
+ from The Android Open Source Project
+ This one puts the check box at the start of the view (rather than at the end).
+ -->
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ 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.
+-->
+
+<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/listPreferredItemHeightSmall"
+ android:textAppearance="?android:attr/textAppearanceListItemSmall"
+ android:gravity="center_vertical"
+ android:drawableStart="?android:attr/listChoiceIndicatorMultiple"
+ android:drawableLeft="?android:attr/listChoiceIndicatorMultiple"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingRight="?android:attr/listPreferredItemPaddingRight"
+ />
diff --git a/app/src/main/res/menu/episodes_apply_action_speeddial.xml b/app/src/main/res/menu/episodes_apply_action_speeddial.xml
new file mode 100644
index 000000000..39083e41b
--- /dev/null
+++ b/app/src/main/res/menu/episodes_apply_action_speeddial.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- the order is opposite of the typical menu:
+ catered to FAB speed dial, which somehow shows the item in reverse.
+ E.g., item @id/delete_batch is the first in the xml,
+ visually it will be shown at the bottom of the list of actions.
+ -->
+ <item android:id="@+id/delete_batch"
+ android:icon="?attr/content_discard"
+ android:title="@string/delete_episode_label"
+ />
+ <item android:id="@+id/download_batch"
+ android:icon="?attr/av_download"
+ android:title="@string/download_label"
+ />
+ <item android:id="@+id/mark_unread_batch"
+ android:icon="?attr/navigation_cancel"
+ android:title="@string/mark_unread_label"
+ />
+ <item
+ android:id="@+id/mark_read_batch"
+ android:icon="?attr/navigation_accept"
+ android:title="@string/mark_read_label"
+ />
+ <item android:id="@+id/remove_from_queue_batch"
+ android:icon="?attr/content_remove_from_queue"
+ android:title="@string/remove_from_queue_label"
+ />
+ <item
+ android:id="@+id/add_to_queue_batch"
+ android:icon="?attr/content_new"
+ android:title="@string/add_to_queue_label"
+ />
+</menu>
diff --git a/app/src/main/res/menu/opml_selection_options.xml b/app/src/main/res/menu/opml_selection_options.xml
index 26d2a0519..8b3310dc2 100644
--- a/app/src/main/res/menu/opml_selection_options.xml
+++ b/app/src/main/res/menu/opml_selection_options.xml
@@ -4,14 +4,14 @@
<item
android:id="@id/select_all_item"
- android:icon="?attr/ic_check_box_outline"
+ android:icon="?attr/ic_select_all"
android:title="@string/select_all_label"
custom:showAsAction="ifRoom">
</item>
<item
android:id="@id/deselect_all_item"
- android:icon="?attr/ic_check_box"
+ android:icon="?attr/ic_select_none"
android:title="@string/deselect_all_label"
custom:showAsAction="ifRoom">
</item>
diff --git a/app/src/main/res/values-w300dp/dimens-fabspeeddial.xml b/app/src/main/res/values-w300dp/dimens-fabspeeddial.xml
new file mode 100644
index 000000000..e531395c0
--- /dev/null
+++ b/app/src/main/res/values-w300dp/dimens-fabspeeddial.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- increase FAB speed dial label's max width if the screen is wide enough
+ (300dp ~ 1.875 inch, devices with 3.5-inch screens have a width of ~ 1.9in
+ so the setup is applicable for most phones)
+ -->
+ <dimen name="sd_label_max_width">240dp</dimen>
+</resources>