Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature GIS-Stories Section UI #36

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/all_stories_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:type="linear"
android:startColor="@color/all_story_start_color"
android:centerColor="@color/all_story_center_color"
android:endColor="@color/all_story_end_color"
android:angle="270"/>
</shape>
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/featured_stories_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
>
<gradient
android:type="linear"
android:startColor="@color/featured_story_start_color"
android:centerColor="@color/featured_story_center_color"
android:endColor="@color/featured_story_end_color"
android:angle="45"/>
</shape>
10 changes: 6 additions & 4 deletions app/src/main/res/layout/fragment_stories.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,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.support.v7.widget.RecyclerView
android:id="@+id/rv_featured_stories"
android:layout_width="match_parent"
android:layout_height="170dp" />
android:layout_height="wrap_content"
android:layout_marginBottom="5dp" />
<TextView
android:id="@+id/tv_other_stories"
android:layout_width="wrap_content"
Expand Down
187 changes: 118 additions & 69 deletions app/src/main/res/layout/list_item_all_stories.xml
Original file line number Diff line number Diff line change
@@ -1,100 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginBottom="4dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:layout_marginTop="3dp">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginTop="3dp"
app:cardCornerRadius="5dp"
app:cardElevation="5dp">

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
android:layout_marginBottom="3dp"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
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" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:background="@drawable/all_stories_gradient"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="5dp">

<ImageView
android:id="@+id/iv_all_story_profile_pic"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="4dp"
android:contentDescription="@string/story_profile_pic_desc"
android:src="@drawable/gis_logo" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="2dp"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:id="@+id/tv_all_story_profile_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/all_story_profile_name"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textStyle="bold" />

<TextView
android:id="@+id/iv_all_story_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/all_story_date"
android:textColor="@android:color/white" />

</LinearLayout>

<ImageView
android:id="@+id/iv_story_heart"
android:layout_width="40dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical|fill_vertical"
android:contentDescription="@string/story_heart_image_desc"
android:padding="4dp"
android:src="@drawable/ic_heart_outline"
android:tint="@android:color/white" />

</LinearLayout>
</RelativeLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">

<ImageView
android:id="@+id/iv_all_story_profile_pic"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_gis_logo"
android:layout_centerVertical="true"/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">

<TextView
android:id="@+id/tv_all_story_profile_name"
android:layout_width="match_parent"
android:id="@+id/tv_all_story_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Akshit Jain"
android:textColor="@color/black"
android:maxLines="1"
android:ellipsize="end"/>
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/all_story_title"
android:textColor="@color/colorPrimaryDark"
android:textSize="18sp"
android:textStyle="bold"
android:visibility="visible" />

<TextView
android:id="@+id/iv_all_story_date"
android:id="@+id/tv_all_story_read_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="14th April 2018"/>
android:padding="2dp"
android:text="@string/all_story_read_time"
android:textSize="15sp" />

</LinearLayout>
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_heart_outline"
android:padding="4dp"
android:tint="@color/black"/>

</LinearLayout>
<ImageView
android:id="@+id/iv_all_story_image"
android:layout_width="match_parent"
android:layout_height="140dp"
android:src="@drawable/ic_sample_story_bg_2"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp"
android:gravity="center">
<TextView
android:id="@+id/tv_all_story_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/featured_story_sample_description"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="16sp"
android:maxLines="2"
android:ellipsize="end"
android:visibility="visible"
android:layout_marginBottom="10dp"/>

<TextView
android:id="@+id/tv_read_txt"
android:id="@+id/tv_all_story_desc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="end"
android:maxLines="1"
android:text="READ"
android:textColor="@color/colorPrimaryDark"
android:textSize="14sp"
android:textStyle="bold"
android:text="@string/all_story_description"
android:textColor="@color/darkGray"
android:textStyle="normal"
android:visibility="visible" />

<!--<TextView-->
<!--android:id="@+id/tv_all_description"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:ellipsize="end"-->
<!--android:gravity="end"-->
<!--android:maxLines="1"-->
<!--android:text="READ"-->
<!--android:textColor="@color/colorPrimaryDark"-->
<!--android:textSize="14sp"-->
<!--android:textStyle="bold"-->
<!--android:visibility="visible" />-->

</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
Loading