Commit d60b1f60 authored by Owais Chunawala's avatar Owais Chunawala

added cardview for event title in event page

parent 978f60c1
...@@ -54,12 +54,10 @@ public class EventFragment extends Fragment { ...@@ -54,12 +54,10 @@ public class EventFragment extends Fragment {
TextView eventDate = (TextView) getActivity().findViewById(R.id.event_page_date); TextView eventDate = (TextView) getActivity().findViewById(R.id.event_page_date);
TextView eventTime = (TextView) getActivity().findViewById(R.id.event_page_time); TextView eventTime = (TextView) getActivity().findViewById(R.id.event_page_time);
TextView eventVenue = (TextView) getActivity().findViewById(R.id.event_page_venue); TextView eventVenue = (TextView) getActivity().findViewById(R.id.event_page_venue);
TextView eventDetails = (TextView) getActivity().findViewById(R.id.event_details_2); TextView eventDescription = (TextView) getActivity().findViewById(R.id.event_page_description);
TextView eventDescription = (TextView) getActivity().findViewById(R.id.event_description_2);
Picasso.with(getContext()).load(event.getEventImageURL()).into(eventPicture); Picasso.with(getContext()).load(event.getEventImageURL()).into(eventPicture);
eventTitle.setText(event.getEventName()); eventTitle.setText(event.getEventName());
eventDetails.setText(event.getEventDescription());
eventDescription.setText(event.getEventDescription()); eventDescription.setText(event.getEventDescription());
Timestamp timestamp = event.getEventStartTime(); Timestamp timestamp = event.getEventStartTime();
Date Date = new Date(timestamp.getTime()); Date Date = new Date(timestamp.getTime());
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.EventFragment"> tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.EventFragment">
...@@ -19,22 +20,25 @@ ...@@ -19,22 +20,25 @@
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:cardBackgroundColor="@color/colorPrimary">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" android:layout_weight="3"
android:orientation="vertical" android:orientation="vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginRight="12dp" android:layout_marginRight="16dp"
android:layout_marginLeft="12dp"> android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp">
<TextView <TextView
android:id="@+id/event_page_title" android:id="@+id/event_page_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textSize="28sp"
android:textSize="18sp" android:textColor="#fff"
android:text="Event Title"/> android:text="Event Title"/>
<LinearLayout <LinearLayout
...@@ -45,28 +49,36 @@ ...@@ -45,28 +49,36 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/event_page_date" android:id="@+id/event_page_date"
android:text="26 May"/> android:text="26 May"
android:textSize="16sp"
android:textColor="#fff"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=" | " android:text=" | "
android:textSize="20dp"/> android:textSize="20dp"
android:textColor="#fff"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/event_page_time" android:id="@+id/event_page_time"
android:text="6:00 PM"/> android:text="6:00 PM"
android:textSize="16sp"
android:textColor="#fff"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=" | " android:text=" | "
android:textSize="20dp"/> android:textSize="20dp"
android:textColor="#fff"/>
<TextView <TextView
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/event_page_venue" android:id="@+id/event_page_venue"
android:text="LH 101" android:text="LH 101"
android:ellipsize="end"/> android:ellipsize="end"
android:textSize="16sp"
android:textColor="#fff"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -76,10 +88,6 @@ ...@@ -76,10 +88,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView
android:id="@+id/event_details_2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout <LinearLayout
style="?android:attr/buttonBarStyle" style="?android:attr/buttonBarStyle"
...@@ -111,7 +119,7 @@ ...@@ -111,7 +119,7 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/event_description_2" android:id="@+id/event_page_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment