summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2016-03-21 13:00:12 +0100
committerByteHamster <info@bytehamster.com>2016-03-24 00:54:24 +0100
commitaa56d6822aee8a1a98555aa9c0203c3efd4608b5 (patch)
treec6f1da5949d3ca4d7138da62702aec344f84660c /app/src/main/res
parent8d2ec19cbe05297afa887cc2263347f112aae3e6 (diff)
downloadAntennaPod-aa56d6822aee8a1a98555aa9c0203c3efd4608b5.zip
Added statistics function
Fixes #1743
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/statistics_activity.xml41
-rw-r--r--app/src/main/res/layout/statistics_listitem.xml57
-rw-r--r--app/src/main/res/xml/preferences.xml3
3 files changed, 101 insertions, 0 deletions
diff --git a/app/src/main/res/layout/statistics_activity.xml b/app/src/main/res/layout/statistics_activity.xml
new file mode 100644
index 000000000..4a72dc7de
--- /dev/null
+++ b/app/src/main/res/layout/statistics_activity.xml
@@ -0,0 +1,41 @@
+<?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="match_parent"
+ android:orientation="vertical"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/total_time_listened_to_podcasts"
+ android:gravity="center_horizontal"/>
+
+ <ProgressBar
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/progressBar"
+ android:layout_gravity="center_horizontal"
+ style="?android:attr/progressBarStyleLarge"/>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/total_time"
+ android:gravity="center_horizontal"
+ android:textSize="45sp"/>
+
+ <ListView
+ android:id="@+id/statistics_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:choiceMode="singleChoice"
+ android:clipToPadding="false"
+ android:divider="@android:color/transparent"
+ android:dividerHeight="0dp"
+ android:paddingBottom="@dimen/list_vertical_padding"
+ android:paddingTop="@dimen/list_vertical_padding"
+ android:scrollbarStyle="outsideOverlay" />
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/statistics_listitem.xml b/app/src/main/res/layout/statistics_listitem.xml
new file mode 100644
index 000000000..20e01bf32
--- /dev/null
+++ b/app/src/main/res/layout/statistics_listitem.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/listitem_iconwithtext_height"
+ android:paddingRight="@dimen/listitem_threeline_verticalpadding"
+ tools:background="@android:color/darker_gray">
+
+ <ImageView
+ android:id="@+id/imgvCover"
+ android:contentDescription="@string/cover_label"
+ android:layout_width="@dimen/thumbnail_length_navlist"
+ android:layout_height="@dimen/thumbnail_length_navlist"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:adjustViewBounds="true"
+ android:cropToPadding="true"
+ android:scaleType="centerCrop"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp"
+ android:layout_marginLeft="@dimen/listitem_icon_leftpadding"
+ tools:src="@drawable/ic_stat_antenna_default"
+ tools:background="@android:color/holo_green_dark"/>
+
+ <TextView
+ android:id="@+id/txtvTime"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/list_vertical_padding"
+ android:lines="1"
+ android:textColor="?android:attr/textColorTertiary"
+ android:textSize="@dimen/text_size_navdrawer"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ tools:text="23"
+ tools:background="@android:color/holo_green_dark"/>
+
+ <TextView
+ android:id="@+id/txtvTitle"
+ android:lines="1"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:layout_centerVertical="true"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="@dimen/text_size_navdrawer"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/listitem_iconwithtext_textleftpadding"
+ android:layout_toRightOf="@id/imgvCover"
+ android:layout_toLeftOf="@id/txtvTime"
+ android:layout_alignWithParentIfMissing="true"
+ tools:text="Navigation feed item title"
+ tools:background="@android:color/holo_green_dark"/>
+
+
+</RelativeLayout>
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index e0671e67b..1e70a62d3 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -269,6 +269,9 @@
android:key="prefOpmlExport"
android:title="@string/opml_export_label"/>
<Preference
+ android:key="statistics"
+ android:title="@string/statistics_label"/>
+ <Preference
android:key="prefAbout"
android:title="@string/about_pref"/>
<Preference