Wikipedia: always show card background (Compose)
This commit is contained in:
parent
5f2dd67486
commit
d1244ae198
@ -28,12 +28,11 @@ fun WikipediaItem(
|
||||
initialRepresentation: Representation,
|
||||
onRepresentationChange: ((Representation) -> Unit)
|
||||
) {
|
||||
val hPadding = if (initialRepresentation == Representation.Full) 8.dp else 16.dp
|
||||
Column(
|
||||
modifier = Modifier
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(start = hPadding, end = hPadding, top = 16.dp)
|
||||
modifier = Modifier.padding(start = 16.dp, end = 24.dp, top = 16.dp)
|
||||
) {
|
||||
Text(
|
||||
text = wikipedia.label,
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package de.mm20.launcher2.ui.search
|
||||
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.material.Card
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import de.mm20.launcher2.ui.SectionDivider
|
||||
import de.mm20.launcher2.wikipedia.WikipediaViewModel
|
||||
@ -15,12 +17,16 @@ fun wikipediaResult(): LazyListScope.() -> Unit {
|
||||
return {
|
||||
wikipedia?.let {
|
||||
item {
|
||||
WikipediaItem(
|
||||
wikipedia = it,
|
||||
representation = Representation.Full,
|
||||
initialRepresentation = Representation.Full,
|
||||
onRepresentationChange = {}
|
||||
)
|
||||
Card(
|
||||
elevation = 0.dp
|
||||
) {
|
||||
WikipediaItem(
|
||||
wikipedia = it,
|
||||
representation = Representation.Full,
|
||||
initialRepresentation = Representation.Full,
|
||||
onRepresentationChange = {}
|
||||
)
|
||||
}
|
||||
}
|
||||
SectionDivider()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user