From 7cf314e65e24e8bd3521b69e04bf916844d86db2 Mon Sep 17 00:00:00 2001 From: Nishank Sanjeev Samant Date: Tue, 24 Apr 2018 13:56:23 +0530 Subject: [PATCH] Re-designed the Stories Section --- .../res/drawable/all_stories_gradient.xml | 9 + .../drawable/featured_stories_gradient.xml | 11 + app/src/main/res/layout/fragment_stories.xml | 10 +- .../main/res/layout/list_item_all_stories.xml | 192 +++++++++++------- .../res/layout/list_item_featured_stories.xml | 121 +++++------ app/src/main/res/values/colors.xml | 16 ++ app/src/main/res/values/strings.xml | 13 +- 7 files changed, 237 insertions(+), 135 deletions(-) create mode 100644 app/src/main/res/drawable/all_stories_gradient.xml create mode 100644 app/src/main/res/drawable/featured_stories_gradient.xml diff --git a/app/src/main/res/drawable/all_stories_gradient.xml b/app/src/main/res/drawable/all_stories_gradient.xml new file mode 100644 index 0000000..abbf661 --- /dev/null +++ b/app/src/main/res/drawable/all_stories_gradient.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/featured_stories_gradient.xml b/app/src/main/res/drawable/featured_stories_gradient.xml new file mode 100644 index 0000000..397690b --- /dev/null +++ b/app/src/main/res/drawable/featured_stories_gradient.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_stories.xml b/app/src/main/res/layout/fragment_stories.xml index 82bc1b9..67cf452 100644 --- a/app/src/main/res/layout/fragment_stories.xml +++ b/app/src/main/res/layout/fragment_stories.xml @@ -16,16 +16,18 @@ android:id="@+id/tv_featured_stories" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="7dp" + android:paddingLeft="10dp" android:text="Featured" android:textColor="@color/colorPrimaryDark" - android:paddingLeft="10dp" android:textStyle="bold" - android:paddingTop="10dp" - android:visibility="visible"/> + android:visibility="visible" /> + + android:layout_height="wrap_content" + android:layout_marginBottom="5dp" /> - - + + - + + + android:layout_height="wrap_content"> + android:id="@+id/iv_all_story_image" + android:layout_width="match_parent" + android:layout_height="200dp" + android:scaleType="centerCrop" + android:src="@drawable/ic_sample_story_bg_2" /> - - + + + + + android:layout_marginStart="4dp" + android:layout_marginTop="2dp" + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + + - + - - - + + + android:layout_height="match_parent" + android:orientation="horizontal"> + + + + + + + + - - - + android:text="@string/all_story_description" + android:textColor="@color/darkGray" + android:textStyle="normal" + android:visibility="visible" /> + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/list_item_featured_stories.xml b/app/src/main/res/layout/list_item_featured_stories.xml index d662924..95c4c39 100644 --- a/app/src/main/res/layout/list_item_featured_stories.xml +++ b/app/src/main/res/layout/list_item_featured_stories.xml @@ -1,88 +1,95 @@ - + app:cardElevation="10dp"> - + android:layout_height="wrap_content" + android:background="@drawable/featured_stories_gradient"> + - + + + android:layout_alignParentEnd="true" + android:layout_alignParentTop="true" + android:layout_gravity="end" + android:contentDescription="@string/story_heart_image_desc" + android:padding="7dp" + android:src="@drawable/ic_heart_outline" + android:tint="@android:color/white" /> + + + + + - - - - + android:visibility="visible" /> + - - - - - - - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 2d420fe..c46623c 100755 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,5 +7,21 @@ #616161 #000000 #FFFFFF + #9ce7e7e7 + #90000000 + #2e000000 + + + #0297cf + #00678e + #002c3d + + + + #000000 + #e3191919 + #0f191919 + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eb3f5c8..9e5b4cb 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,6 +34,17 @@ Forgot your password? Reset here. - "25 Android libraries you definitely want to try out in early 2017" + + Akshit Jain + 19 april 2018 + My Story Name + This story tells us about my experience as a google scholar + 3 min + 3 min + Akshit Jain + "25 Android libraries you definitely want to try out in early 2017" + Heart Icon + Profile Pic +