commit bd3d37da4d1e5c323b079ea0e6b3536f38cb9b2a
parent b2260490e925e7c193545c8812508185d8d51a91
Author: William Lindholm <william_lindholm@outlook.com>
Date: Thu, 11 May 2023 00:04:45 +0200
Modified color theme.
Diffstat:
7 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/app/src/main/assets/style.css b/app/src/main/assets/style.css
@@ -1,6 +1,6 @@
:root {
--bgColor: #2a2a33;
- --textColor: azure;
+ --textColor: #f0ffff;
--sectionColor: #363d47;
}
diff --git a/app/src/main/java/com/example/project_assignment/RecyclerViewAdapter.java b/app/src/main/java/com/example/project_assignment/RecyclerViewAdapter.java
@@ -37,7 +37,7 @@ public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapte
public void onBindViewHolder(@NonNull RecyclerViewAdapter.MyViewHolder holder, int position) {
holder.meteoriteName.setText(meteorites.get(position).name);
holder.meteoriteMass.setText(meteorites.get(position).mass + "kg");
- holder.MeteoriteAge.setText(meteorites.get(position).date);
+ holder.MeteoriteAge.setText(meteorites.get(position).date.substring(0, 4));
}
@Override
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
@@ -10,6 +10,7 @@
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="#2A2A33"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -22,6 +23,7 @@
android:layout_marginBottom="32dp"
android:clickable="true"
android:contentDescription="Show sorting options"
+ app:backgroundTint="#FFD600"
app:layout_constraintBottom_toBottomOf="@+id/recyclerView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.923"
@@ -37,6 +39,7 @@
android:layout_marginBottom="20dp"
android:clickable="true"
android:contentDescription="Show about info."
+ app:backgroundTint="#FFD600"
app:layout_constraintBottom_toTopOf="@+id/showSortingOptionsButton"
app:layout_constraintEnd_toEndOf="@+id/showSortingOptionsButton"
app:srcCompat="@android:drawable/ic_menu_help"
diff --git a/app/src/main/res/layout/filter_popup.xml b/app/src/main/res/layout/filter_popup.xml
@@ -15,9 +15,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
- android:background="@color/white"
- android:backgroundTint="#ADB4B6"
- android:foregroundTint="#BD1B1B"
+ android:background="#FFE3E3E3"
+ android:backgroundTint="#FFE3E3E3"
android:foregroundTintMode="add">
<androidx.constraintlayout.widget.ConstraintLayout
@@ -188,8 +187,9 @@
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="?android:attr/listDivider"
- app:layout_constraintTop_toBottomOf="@+id/textView6"
- tools:layout_editor_absoluteX="1dp" />
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/textView6" />
<TextView
android:id="@+id/textView"
diff --git a/app/src/main/res/layout/recycler_item.xml b/app/src/main/res/layout/recycler_item.xml
@@ -8,13 +8,15 @@
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:background="#363D47"
+ android:backgroundTint="#363D47"
+ android:foreground="?android:attr/selectableItemBackground"
android:scaleX="0.95"
android:scaleY="0.95"
- app:cardBackgroundColor="#E6E2E2"
+ app:cardBackgroundColor="#363D47"
app:cardCornerRadius="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- android:foreground="?android:attr/selectableItemBackground"
tools:ignore="MissingConstraints">
<androidx.constraintlayout.widget.ConstraintLayout
@@ -22,6 +24,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
+ android:background="#363D47"
+ android:backgroundTint="#363D47"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5">
@@ -33,6 +37,7 @@
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:text="TextView"
+ android:textColor="#F0FFFF"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/textview_meteoriteAge"
@@ -50,7 +55,7 @@
android:layout_marginBottom="10dp"
android:fontFamily="monospace"
android:text="TextView"
- android:textColor="#918C8C"
+ android:textColor="#F0FFFF"
android:textStyle="italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textview_meteoriteAge"
@@ -66,6 +71,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="TextView"
+ android:textColor="#F0FFFF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
@@ -7,4 +7,7 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
+ <color name="yellowAccent">#FFD600</color>
+ <color name="background">#2a2a33</color>
+ <color name="sectionColor">#363d47</color>
</resources>
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
@@ -2,12 +2,12 @@
<!-- Base application theme. -->
<style name="Theme.Projectassignment" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
- <item name="colorPrimary">@color/purple_500</item>
- <item name="colorPrimaryVariant">@color/purple_700</item>
+ <item name="colorPrimary">@color/background</item>
+ <item name="colorPrimaryVariant">@color/sectionColor</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
- <item name="colorSecondary">@color/teal_200</item>
- <item name="colorSecondaryVariant">@color/teal_700</item>
+ <item name="colorSecondary">@color/yellowAccent</item>
+ <item name="colorSecondaryVariant">@color/yellowAccent</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>