Fix background color on startup
This commit is contained in:
parent
1be4779df2
commit
fc82363196
|
@ -15,6 +15,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.RectangleShape
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
|
@ -46,10 +47,8 @@ fun FeedItem(
|
|||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.background(
|
||||
color = MaterialTheme.colorScheme.secondary.copy(alpha = alpha),
|
||||
shape = if (isEnded()) ShapeBottom32 else RectangleShape,
|
||||
)
|
||||
.clip(if (isEnded()) ShapeBottom32 else RectangleShape)
|
||||
.background(MaterialTheme.colorScheme.secondary.copy(alpha = alpha))
|
||||
.combinedClickable(
|
||||
onClick = {
|
||||
onClick()
|
||||
|
|
|
@ -50,9 +50,7 @@ fun GroupItem(
|
|||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.clip(if (isExpanded() && !isEnded()) ShapeTop32 else Shape32)
|
||||
.background(
|
||||
MaterialTheme.colorScheme.secondary.copy(alpha = alpha)
|
||||
)
|
||||
.background(MaterialTheme.colorScheme.secondary.copy(alpha = alpha))
|
||||
.combinedClickable(
|
||||
onClick = {
|
||||
groupOnClick()
|
||||
|
@ -84,12 +82,8 @@ fun GroupItem(
|
|||
.padding(end = 20.dp)
|
||||
.size(24.dp)
|
||||
.clip(CircleShape)
|
||||
.background(
|
||||
MaterialTheme.colorScheme.surfaceTint.copy(alpha = indicatorAlpha)
|
||||
)
|
||||
.clickable {
|
||||
onExpanded()
|
||||
},
|
||||
.background(MaterialTheme.colorScheme.surfaceTint.copy(alpha = indicatorAlpha))
|
||||
.clickable { onExpanded() },
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
|
|
4
app/src/main/res/values-night/colors.xml
Normal file
4
app/src/main/res/values-night/colors.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="windowBackground">#FF000000</color>
|
||||
</resources>
|
|
@ -1,10 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="windowBackground">#FFFFFFFF</color>
|
||||
</resources>
|
|
@ -1,7 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Reader" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:statusBarColor">@color/purple_700</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
|
||||
<item name="android:windowActionModeOverlay">true</item>
|
||||
<item name="android:windowContentOverlay">@color/windowBackground</item>
|
||||
<item name="android:windowBackground">@color/windowBackground</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user