From 8600a3acdd2b9ce8aecd53a7e10f590866a97000 Mon Sep 17 00:00:00 2001 From: Tobias Preuss Date: Wed, 13 Jun 2018 23:07:42 +0200 Subject: Render preview for all episodes layout with sample data. --- app/sampledata/episodes.json | 34 +++++++++++++++++++++++ app/sampledata/inplaylist | 2 ++ app/sampledata/secondaryaction | 3 ++ app/src/main/res/layout/all_episodes_fragment.xml | 6 ++-- app/src/main/res/layout/new_episodes_listitem.xml | 25 ++++++----------- app/src/main/res/layout/secondary_action.xml | 3 +- 6 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 app/sampledata/episodes.json create mode 100644 app/sampledata/inplaylist create mode 100644 app/sampledata/secondaryaction (limited to 'app') diff --git a/app/sampledata/episodes.json b/app/sampledata/episodes.json new file mode 100644 index 000000000..209cbf180 --- /dev/null +++ b/app/sampledata/episodes.json @@ -0,0 +1,34 @@ +{ + "data": [ + { + "title": "FLOSS Weekly 482: PyPI", + "status_label": "NEW", + "duration": "00:52:40", + "published_at": "2. May" + }, + { + "title": "FLOSS Weekly 479: Pidgin", + "status_label": " ", + "duration": "01:08:08", + "published_at": "11. Apr" + }, + { + "title": "Linux Outlaws 370 - Stay Free, Stay Open Source", + "status_label": "NEW", + "duration": "02:52:51", + "published_at": "29. Dec 2014" + }, + { + "title": "Linux Outlaws 368 - The Dark Ages of Free Software", + "status_label": " ", + "duration": "02:26:54", + "published_at": "14. Dec 2014" + }, + { + "title": "Linux Outlaws 365 - Last Stand", + "status_label": " ", + "duration": "00:39:59", + "published_at": "3. Nov 2014" + } + ] +} diff --git a/app/sampledata/inplaylist b/app/sampledata/inplaylist new file mode 100644 index 000000000..e78406d75 --- /dev/null +++ b/app/sampledata/inplaylist @@ -0,0 +1,2 @@ +@null +@drawable/ic_list_grey600_24dp \ No newline at end of file diff --git a/app/sampledata/secondaryaction b/app/sampledata/secondaryaction new file mode 100644 index 000000000..26083bc9c --- /dev/null +++ b/app/sampledata/secondaryaction @@ -0,0 +1,3 @@ +@drawable/ic_play_arrow_grey600_36dp +@drawable/ic_file_download_grey600_24dp +@drawable/ic_cancel_grey600_24dp \ No newline at end of file diff --git a/app/src/main/res/layout/all_episodes_fragment.xml b/app/src/main/res/layout/all_episodes_fragment.xml index 5336fb8ce..7dd447bb2 100644 --- a/app/src/main/res/layout/all_episodes_fragment.xml +++ b/app/src/main/res/layout/all_episodes_fragment.xml @@ -13,7 +13,9 @@ android:scrollbarStyle="outsideOverlay" android:paddingTop="@dimen/list_vertical_padding" android:paddingBottom="@dimen/list_vertical_padding" - android:clipToPadding="false"/> + android:clipToPadding="false" + tools:listitem="@layout/new_episodes_listitem" + tools:itemCount="13"/> diff --git a/app/src/main/res/layout/new_episodes_listitem.xml b/app/src/main/res/layout/new_episodes_listitem.xml index d533ee642..5e0d7451b 100644 --- a/app/src/main/res/layout/new_episodes_listitem.xml +++ b/app/src/main/res/layout/new_episodes_listitem.xml @@ -13,7 +13,6 @@ android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" android:orientation="horizontal" - tools:background="@android:color/darker_gray" android:gravity="center_vertical"> + tools:src="@tools:sample/avatars" /> @@ -54,8 +52,7 @@ android:layout_marginLeft="@dimen/listitem_threeline_textleftpadding" android:layout_marginRight="@dimen/listitem_threeline_textrightpadding" android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" - android:layout_weight="1" - tools:background="@android:color/white" > + android:layout_weight="1"> + android:layout_marginLeft="8dp" + tools:text="@sample/episodes.json/data/status_label"/> + tools:text="@sample/episodes.json/data/title" /> + android:layout_alignParentRight="true"> + tools:text="@sample/episodes.json/data/duration" /> + tools:src="@sample/inplaylist" /> + tools:text="@sample/episodes.json/data/published_at" /> + tools:src="@sample/secondaryaction" /> -- cgit v1.2.3