From a7af0265d347f03bee51870a9caad8860a9ed7db Mon Sep 17 00:00:00 2001 From: Hazel Wright Date: Mon, 19 Jun 2023 15:38:17 +0100 Subject: [PATCH] Changed the colour of event cards to match the match cards. --- .../main/java/com/example/drp25/CommitteeEventsActivity.kt | 2 ++ app/src/main/java/com/example/drp25/UserEventsActivity.kt | 2 ++ app/src/main/res/layout/activity_user_events.xml | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/drp25/CommitteeEventsActivity.kt b/app/src/main/java/com/example/drp25/CommitteeEventsActivity.kt index 1f26201..89d245b 100644 --- a/app/src/main/java/com/example/drp25/CommitteeEventsActivity.kt +++ b/app/src/main/java/com/example/drp25/CommitteeEventsActivity.kt @@ -41,6 +41,8 @@ class CommitteeEventsActivity : AppCompatActivity() { val eventCard = inflater.inflate( R.layout.committee_event_view, eventsList, false ) as CardView + eventCard.setCardBackgroundColor(getColor(R.color.light_grey_0)) + /* Views in the card. */ eventCard.findViewById(R.id.share_prompt).text = name eventCard.findViewById(R.id.new_event_descr).text = desc eventCard.findViewById(R.id.new_event_date).text = date diff --git a/app/src/main/java/com/example/drp25/UserEventsActivity.kt b/app/src/main/java/com/example/drp25/UserEventsActivity.kt index 2bce498..1ecfb93 100644 --- a/app/src/main/java/com/example/drp25/UserEventsActivity.kt +++ b/app/src/main/java/com/example/drp25/UserEventsActivity.kt @@ -35,6 +35,8 @@ class UserEventsActivity : AppCompatActivity() { val eventCard = inflater.inflate( R.layout.user_event_view, eventsList, false ) as CardView + eventCard.setCardBackgroundColor(getColor(R.color.light_grey_0)) + /* Views in the card. */ eventCard.findViewById(R.id.share_prompt).text = name eventCard.findViewById(R.id.new_event_descr).text = desc eventCard.findViewById(R.id.new_event_date).text = date diff --git a/app/src/main/res/layout/activity_user_events.xml b/app/src/main/res/layout/activity_user_events.xml index b281ab3..c25b373 100644 --- a/app/src/main/res/layout/activity_user_events.xml +++ b/app/src/main/res/layout/activity_user_events.xml @@ -23,10 +23,12 @@ android:layout_margin="@dimen/margin_16" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:gravity="center_vertical" + android:gravity="center" android:minWidth="300dp" android:text="@string/upcoming_events_related_to_your_interests" - android:textSize="16sp" + android:textColor="@color/stream_ui_black" + android:textSize="24sp" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" />