diff options
author | ByteHamster <info@bytehamster.com> | 2019-10-03 11:12:40 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-10-03 11:12:40 +0200 |
commit | 80de04a3245755a8a2647c60631255977539dab3 (patch) | |
tree | 78ca8dcb07687d3d69fcc1b893e96a03114c4191 /app/src/main/res/layout | |
parent | 2db5c00d667f88eddf210b817d380ed5bdf0ccd0 (diff) | |
download | AntennaPod-80de04a3245755a8a2647c60631255977539dab3.zip |
Converted statistics to RecyclerView
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/statistics_activity.xml | 50 | ||||
-rw-r--r-- | app/src/main/res/layout/statistics_listitem.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/statistics_listitem_total_time.xml | 40 |
3 files changed, 50 insertions, 43 deletions
diff --git a/app/src/main/res/layout/statistics_activity.xml b/app/src/main/res/layout/statistics_activity.xml index fe42ce32e..2d606f62c 100644 --- a/app/src/main/res/layout/statistics_activity.xml +++ b/app/src/main/res/layout/statistics_activity.xml @@ -1,58 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> - <LinearLayout - android:layout_width="match_parent" + <ProgressBar + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="14sp" - android:text="@string/total_time_listened_to_podcasts" - android:gravity="center_horizontal"/> - - <TextView - 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" - tools:text="10.0 hours"/> - - <ProgressBar - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/progressBar" - android:layout_gravity="center_horizontal" - style="?android:attr/progressBarStyleSmall"/> - </LinearLayout> + android:id="@+id/progressBar" + android:layout_gravity="center"/> - <View - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="?android:attr/dividerVertical"/> - - <ListView + <android.support.v7.widget.RecyclerView android:id="@+id/statistics_list" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:choiceMode="singleChoice" + android:layout_height="match_parent" 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" tools:listitem="@layout/statistics_listitem"/> -</LinearLayout> +</FrameLayout> diff --git a/app/src/main/res/layout/statistics_listitem.xml b/app/src/main/res/layout/statistics_listitem.xml index b85cdc74e..6bd2a907e 100644 --- a/app/src/main/res/layout/statistics_listitem.xml +++ b/app/src/main/res/layout/statistics_listitem.xml @@ -7,7 +7,8 @@ android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingTop="8dp" - android:paddingBottom="8dp"> + android:paddingBottom="8dp" + android:background="?android:attr/selectableItemBackground"> <ImageView android:id="@+id/imgvCover" diff --git a/app/src/main/res/layout/statistics_listitem_total_time.xml b/app/src/main/res/layout/statistics_listitem_total_time.xml new file mode 100644 index 000000000..2db42ac74 --- /dev/null +++ b/app/src/main/res/layout/statistics_listitem_total_time.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout 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" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="14sp" + android:text="@string/total_time_listened_to_podcasts" + android:gravity="center_horizontal"/> + + <TextView + 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" + tools:text="10.0 hours"/> + + </LinearLayout> + + <View + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_marginBottom="8dp" + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="?android:attr/dividerVertical"/> + +</LinearLayout>
\ No newline at end of file |