Skip to content

Commit

Permalink
Fix sample app colors. (#2595)
Browse files Browse the repository at this point in the history
* Fix sample app colors.

* Update color.
  • Loading branch information
colinrtwhite authored Oct 26, 2024
1 parent 9a65ba6 commit 2b8bda7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
7 changes: 5 additions & 2 deletions samples/compose/src/commonMain/kotlin/sample/compose/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ const val Title = "Coil"

private val darkColors = darkColorScheme(
background = Color(0xFF141218),
surface = Color(0xFF121212),
surface = Color(0xFF141218),
)

private val lightColors = lightColorScheme()
private val lightColors = lightColorScheme(
background = Color.White,
surface = Color.White,
)

@OptIn(ExperimentalResourceApi::class)
private val resourceDetailScreen = Screen.Detail(
Expand Down
10 changes: 5 additions & 5 deletions samples/shared/src/androidMain/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<resources>

<style name="AppTheme.v21" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">#121212</item>
<item name="colorPrimaryDark">#121212</item>
<item name="colorAccent">#121212</item>

<item name="android:statusBarColor">#121212</item>
<item name="colorPrimary">#141218</item>
<item name="colorPrimaryDark">#141218</item>
<item name="colorAccent">#141218</item>
<item name="android:background">#141218</item>
<item name="android:statusBarColor">#141218</item>
</style>

<style name="AppTheme" parent="AppTheme.v21"/>
Expand Down
2 changes: 1 addition & 1 deletion samples/shared/src/androidMain/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<item name="colorPrimary">#FFF</item>
<item name="colorPrimaryDark">#FFF</item>
<item name="colorAccent">#FFF</item>

<item name="android:background">#FFF</item>
<item name="android:statusBarColor">#FFF</item>
</style>

Expand Down
18 changes: 6 additions & 12 deletions samples/view/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@
android:layout_height="match_parent"
tools:context=".MainActivity">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"/>
</com.google.android.material.appbar.AppBarLayout>
app:layout_constraintTop_toTopOf="parent"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
Expand All @@ -30,7 +24,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar"/>
app:layout_constraintTop_toBottomOf="@id/toolbar"/>

<ImageView
android:id="@+id/detail"
Expand All @@ -40,5 +34,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar"/>
app:layout_constraintTop_toBottomOf="@id/toolbar"/>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 2b8bda7

Please sign in to comment.