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/feed_statistics.xml18
-rw-r--r--app/src/main/res/layout/statistics_filter_dialog.xml95
-rw-r--r--app/src/main/res/layout/statistics_listitem_total.xml36
-rw-r--r--app/src/main/res/layout/statistics_mode_select_dialog.xml25
-rw-r--r--app/src/main/res/menu/statistics.xml9
-rw-r--r--app/src/main/res/xml/preferences.xml5
6 files changed, 117 insertions, 71 deletions
diff --git a/app/src/main/res/layout/feed_statistics.xml b/app/src/main/res/layout/feed_statistics.xml
index f8f5ac555..7897a7d5f 100644
--- a/app/src/main/res/layout/feed_statistics.xml
+++ b/app/src/main/res/layout/feed_statistics.xml
@@ -46,24 +46,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/statistics_duration_played_episodes" />
-
- <TextView
- android:id="@+id/durationPlayedLabel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dp"
- android:layout_marginStart="8dp"
- tools:text="0 min" />
-
- </TableRow>
-
- <TableRow
- android:tag="detailed">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
android:text="@string/statistics_total_duration" />
<TextView
diff --git a/app/src/main/res/layout/statistics_filter_dialog.xml b/app/src/main/res/layout/statistics_filter_dialog.xml
new file mode 100644
index 000000000..d37226c07
--- /dev/null
+++ b/app/src/main/res/layout/statistics_filter_dialog.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <CheckBox
+ android:id="@+id/includeMarkedCheckbox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_include_marked"
+ android:layout_marginBottom="8dp" />
+
+ <LinearLayout
+ android:id="@+id/dateSelectionContainer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_from"
+ android:padding="4dp"
+ android:layout_weight="1" />
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_to"
+ android:padding="4dp"
+ android:layout_weight="1" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Spinner
+ android:id="@+id/timeFromSpinner"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
+
+ <Spinner
+ android:id="@+id/timeToSpinner"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Button
+ android:id="@+id/lastYearButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_filter_last_year"
+ android:layout_weight="1"
+ android:layout_marginEnd="4dp"
+ style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
+
+ <Button
+ android:id="@+id/allTimeButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_filter_all_time"
+ android:layout_weight="1"
+ android:layout_marginStart="4dp"
+ style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/statistics_speed_not_counted"
+ android:layout_marginTop="16dp" />
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/statistics_listitem_total.xml b/app/src/main/res/layout/statistics_listitem_total.xml
index 628e26c1f..11ff24977 100644
--- a/app/src/main/res/layout/statistics_listitem_total.xml
+++ b/app/src/main/res/layout/statistics_listitem_total.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -16,33 +17,32 @@
android:layout_marginLeft="8dp" />
<TextView
- android:id="@+id/total_description"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_centerHorizontal="true"
- android:textAlignment="center"
- android:layout_marginLeft="56dp"
- android:layout_marginRight="56dp"
- android:maxLines="3"
- android:layout_above="@id/total_time"
- android:textSize="14sp" />
-
- <TextView
+ android:id="@+id/total_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:id="@+id/total_time"
android:textColor="?android:attr/textColorPrimary"
android:gravity="center_horizontal"
android:textSize="28sp"
+ android:layout_marginBottom="4dp"
+ android:layout_above="@id/total_description"
+ tools:text="10.0 hours" />
+
+ <TextView
+ android:id="@+id/total_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:textAlignment="center"
+ android:maxLines="3"
+ android:textSize="14sp"
android:layout_marginBottom="16dp"
- android:layout_alignBottom="@id/pie_chart"
- tools:text="10.0 hours"/>
+ android:layout_alignBottom="@id/pie_chart" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:background="?android:attr/dividerVertical"
- android:layout_below="@+id/pie_chart"/>
+ android:layout_below="@+id/pie_chart" />
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>
diff --git a/app/src/main/res/layout/statistics_mode_select_dialog.xml b/app/src/main/res/layout/statistics_mode_select_dialog.xml
deleted file mode 100644
index 8f8e1e657..000000000
--- a/app/src/main/res/layout/statistics_mode_select_dialog.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="16dp">
-
- <TextView
- android:text="@string/statistics_speed_not_counted"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"/>
-
- <RadioButton
- android:id="@+id/statistics_mode_normal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/statistics_mode_normal"/>
-
- <RadioButton
- android:id="@+id/statistics_mode_count_all"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/statistics_mode_count_all"/>
-</RadioGroup>
diff --git a/app/src/main/res/menu/statistics.xml b/app/src/main/res/menu/statistics.xml
index 9e4b7fab1..71bd12b63 100644
--- a/app/src/main/res/menu/statistics.xml
+++ b/app/src/main/res/menu/statistics.xml
@@ -5,14 +5,13 @@
<item
android:id="@+id/statistics_reset"
android:title="@string/statistics_reset_data"
- custom:showAsAction="never"
- />
+ custom:showAsAction="never" />
<item
- android:id="@+id/statistics_mode"
+ android:id="@+id/statistics_filter"
android:icon="@drawable/ic_filter"
- android:title="@string/statistics_mode"
- custom:showAsAction="never">
+ android:title="@string/filter"
+ custom:showAsAction="always">
</item>
</menu>
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 91ba649d2..9967d7fd1 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -44,11 +44,6 @@
android:title="@string/notification_pref_fragment"
android:icon="@drawable/ic_notifications"/>
- <Preference
- android:icon="@drawable/chart_box_outline"
- android:key="statistics"
- android:title="@string/statistics_label" />
-
<PreferenceCategory
android:key="project"
android:title="@string/project_pref">