Skip to content

Commit

Permalink
Enhance UI of event details page (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
oindrilabhadra78 authored and atm1504 committed Jun 15, 2019
1 parent 3807eb9 commit d09a7b3
Show file tree
Hide file tree
Showing 15 changed files with 201 additions and 109 deletions.
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_access_alarm_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22,5.72l-4.6,-3.86 -1.29,1.53 4.6,3.86L22,5.72zM7.88,3.39L6.6,1.86 2,5.71l1.29,1.53 4.59,-3.85zM12.5,8L11,8v6l4.75,2.85 0.75,-1.23 -4,-2.37L12.5,8zM12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_date_range_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_place_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/marker.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<solid
android:color="@color/colorAccent"/>

<size
android:width="120dp"
android:height="120dp"/>
</shape>
177 changes: 111 additions & 66 deletions app/src/main/res/layout/activity_event_details.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/fragments_activities_background_color">
android:background="@color/fragments_activities_background_color"
android:focusableInTouchMode="true">

<ScrollView
android:layout_width="match_parent"
Expand All @@ -13,79 +14,123 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="@dimen/padding_login_big">

<android.support.v7.widget.AppCompatImageView
android:id="@+id/event_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_big"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:src="@drawable/placeholder_image"
tools:src="@drawable/placeholder_image" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:padding="@dimen/padding_medium"
android:textSize="@dimen/textsize_big"
android:textStyle="bold"
tools:text="Title"
android:textColor="@color/black"/>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:padding="@dimen/padding_medium"
android:textSize="@dimen/textsize_medium"
tools:text="28-05-2019"
android:textColor="@color/black"/>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:padding="@dimen/padding_medium"
android:text="08:00"
android:textSize="@dimen/textsize_medium"
tools:text="08:00"
android:textColor="@color/black"/>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_location"
android:layout_width="wrap_content"
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:padding="@dimen/padding_medium"
android:textSize="@dimen/textsize_medium"
tools:text="Kolkata"
android:textColor="@color/black"/>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:fontFamily="sans-serif"
android:padding="@dimen/padding_medium"
android:textSize="@dimen/textsize_medium"
tools:text="Description"
android:textColor="@color/black"/>
android:background="@color/white"
android:elevation="@dimen/card_login_elevation"
app:cardCornerRadius="@dimen/card_radius">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="@dimen/image_button_padding"
android:paddingEnd="@dimen/image_button_padding">

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:paddingTop="@dimen/donate_padding"
android:paddingBottom="@dimen/padding_medium"
android:textColor="@color/black"
android:textSize="@dimen/header_textsize"
tools:text="Title" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/padding_medium">

<android.support.v7.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_5dp"
android:src="@drawable/ic_place_black_24dp"
android:tint="@color/event_icon" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:textColor="@color/black"
tools:text="Kolkata" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/padding_medium">

<android.support.v7.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_5dp"
android:src="@drawable/ic_date_range_black_24dp"
android:tint="@color/event_icon" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:textColor="@color/black"
tools:text="28-05-2019" />
</LinearLayout>

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

<android.support.v7.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_5dp"
android:src="@drawable/ic_access_alarm_black_24dp"
android:tint="@color/event_icon" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="08:00"
android:textColor="@color/black"
tools:text="08:00" />
</LinearLayout>

<android.support.v7.widget.AppCompatTextView
android:id="@+id/event_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium"
android:fontFamily="sans-serif"
android:paddingTop="@dimen/padding_medium"
android:paddingBottom="@dimen/donate_padding"
android:textSize="@dimen/textsize_medium"
tools:text="Description" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_otp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/margin_30dp"
android:background="@drawable/round_button"
android:padding="@dimen/padding_medium"
android:padding="@dimen/padding_big"
android:text="@string/resend"
android:textColor="@color/white"
android:textSize="@dimen/textsize_medium"
Expand Down
69 changes: 38 additions & 31 deletions app/src/main/res/layout/event_list_row.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/parent_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/parent_layout">
android:paddingStart="@dimen/margin_5dp"
android:paddingEnd="@dimen/margin_5dp">

<com.github.vipulasri.timelineview.TimelineView
android:id="@+id/timeline"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/timeline"
app:startLineColor="@color/colorAccent"
app:endLineColor="@color/colorAccent"
app:endLineColor="@color/colorPrimary"
app:lineWidth="@dimen/timeline_line_width"
app:markerSize="@dimen/timeline_marker_size" />
app:marker="@drawable/marker"
app:markerSize="@dimen/timeline_marker_size"
app:startLineColor="@color/colorPrimary" />

<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/padding_medium"
android:background="@color/white"
android:foreground="?android:selectableItemBackground"
android:elevation="@dimen/card_elevation"
android:padding="@dimen/padding_medium"
app:cardCornerRadius="@dimen/card_radius"
android:background="@color/white">
app:cardCornerRadius="@dimen/card_radius">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/padding_medium">
android:paddingStart="@dimen/timeline_padding_horizontal"
android:paddingTop="@dimen/padding_medium"
android:paddingEnd="@dimen/timeline_padding_horizontal"
android:paddingBottom="@dimen/timeline_padding_horizontal">

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:fontFamily="sans-serif"
android:paddingBottom="@dimen/margin_5dp"
android:textColor="@color/black"
android:textSize="@dimen/textsize_big"
android:fontFamily="sans-serif"
android:textStyle="bold"
tools:text="Title"
android:ellipsize="end"/>
tools:text="Title" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/location"
android:layout_width="@dimen/no_margin"
android:layout_weight="2"
android:layout_height="wrap_content"
android:textColor="@color/black"
tools:text="Kolkata"
android:ellipsize="end"
android:gravity="start"/>
<TextView
android:id="@+id/location"
android:layout_width="@dimen/no_margin"
android:layout_height="wrap_content"
android:layout_weight="2"
android:ellipsize="end"
android:gravity="start"
android:textColor="@color/black"
tools:text="Kolkata" />

<TextView
android:id="@+id/date"
android:layout_width="@dimen/no_margin"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textColor="@color/black"
tools:text="24-05-2019"
android:ellipsize="end"
android:gravity="end" />
<TextView
android:id="@+id/date"
android:layout_width="@dimen/no_margin"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="end"
android:textColor="@color/black"
tools:text="24-05-2019" />

</LinearLayout>
</LinearLayout>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_donate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/fragments_activities_background_color"
tools:context=".Donate.DonateFragment">

<ScrollView
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_edit_profile.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/fragments_activities_background_color"
android:background="@color/white"
android:focusableInTouchMode="true">

<ScrollView
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@
android:textAppearance="?android:textAppearanceMedium"
android:text="@string/office_admin_home"
android:layout_margin="@dimen/margin_medium"
android:textColor="@color/black"
android:background="@color/white"/>
android:textColor="@color/black"/>

<android.support.v7.widget.AppCompatButton
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit d09a7b3

Please sign in to comment.