Skip to content

Commit

Permalink
[feat]: placeholder background and card stroke using dynamic colors (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse205 authored Jun 30, 2024
1 parent acac895 commit a5195bf
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<solid android:color="@color/placeholder_icon_background" />
<solid android:color="?colorSurfaceContainerHighest" />

<padding
android:top="25dp"
Expand Down
5 changes: 0 additions & 5 deletions core/core-ui/src/main/res/values-night/colors.xml

This file was deleted.

3 changes: 0 additions & 3 deletions core/core-ui/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@

<color name="ic_launcher_background">@color/white</color>
<color name="ic_launcher_foreground">@color/color_primary</color>

<color name="card_stroke_color">#ffdadce0</color>
<color name="placeholder_icon_background">#E5E5E5</color>
</resources>
4 changes: 4 additions & 0 deletions core/core-ui/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@
<item name="rippleColor">?colorControlHighlight</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.None</item>
</style>

<style name="Widget.LogFox.CardView.Outlined" parent="Widget.Material3.CardView.Outlined">
<item name="cardCornerRadius">10dp</item>
</style>
</resources>
1 change: 1 addition & 0 deletions core/core-ui/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges</item>

<item name="materialAlertDialogTheme">@style/ThemeOverlay.LogFox.MaterialAlertDialog</item>
<item name="materialCardViewOutlinedStyle">@style/Widget.LogFox.CardView.Outlined</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.LogFox.BottomSheetDialog</item>
<item name="preferenceTheme">@style/ThemeOverlay.LogFox.PreferenceTheme</item>
<item name="toolbarStyle">@style/Widget.LogFox.Toolbar</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@
android:id="@+id/actions_card"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:cardBackgroundColor="?android:windowBackground"
app:cardCornerRadius="10dp"
app:cardElevation="0dp"
app:strokeColor="@color/card_stroke_color"
app:strokeWidth="1dp"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
Expand Down Expand Up @@ -140,11 +135,6 @@
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
app:cardBackgroundColor="?android:windowBackground"
app:cardCornerRadius="10dp"
app:cardElevation="0dp"
app:strokeColor="@color/card_stroke_color"
app:strokeWidth="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:id="@+id/placeholder_icon"
android:layout_width="120dp"
android:layout_height="120dp"
app:tint="?android:textColorSecondary"
app:tint="?colorOnSurfaceVariant"
app:srcCompat="@drawable/ic_bug"
android:background="@drawable/placeholder_icon_background"
app:layout_constraintTop_toTopOf="parent"
Expand Down
3 changes: 0 additions & 3 deletions feature/feature-filters/src/main/res/layout/item_filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
app:cardBackgroundColor="?android:colorBackground"
app:strokeWidth="1dp"
app:strokeColor="@color/card_stroke_color"
xmlns:tools="http://schemas.android.com/tools">

<androidx.constraintlayout.widget.ConstraintLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:id="@+id/placeholder_icon"
android:layout_width="120dp"
android:layout_height="120dp"
app:tint="?android:textColorSecondary"
app:tint="?colorOnSurfaceVariant"
app:srcCompat="@drawable/ic_filter"
android:background="@drawable/placeholder_icon_background"
app:layout_constraintTop_toTopOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:id="@+id/placeholder_icon"
android:layout_width="120dp"
android:layout_height="120dp"
app:tint="?android:textColorSecondary"
app:tint="?colorOnSurfaceVariant"
app:srcCompat="@drawable/ic_bug"
android:background="@drawable/placeholder_icon_background"
app:layout_constraintTop_toTopOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:id="@+id/placeholder_icon"
android:layout_width="120dp"
android:layout_height="120dp"
app:tint="?android:textColorSecondary"
app:tint="?colorOnSurfaceVariant"
app:srcCompat="@drawable/ic_recording"
android:background="@drawable/placeholder_icon_background"
app:layout_constraintTop_toTopOf="parent"
Expand Down

0 comments on commit a5195bf

Please sign in to comment.