mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 14:27:02 +05:30
Merge #143
143: Use FlowLayout for TagRow and cleanup testing infra r=msfjarvis a=msfjarvis bors r+ Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
commit
bdf5cb7a2e
7 changed files with 10 additions and 5 deletions
|
@ -53,6 +53,7 @@ dependencies {
|
|||
implementation(Dependencies.AndroidX.Lifecycle.viewmodelKtx)
|
||||
implementation(Dependencies.Kotlin.Coroutines.android)
|
||||
implementation(Dependencies.ThirdParty.accompanist)
|
||||
implementation(Dependencies.ThirdParty.composeFlowLayout)
|
||||
implementation(Dependencies.ThirdParty.Moshi.lib)
|
||||
implementation(Dependencies.ThirdParty.Retrofit.moshi)
|
||||
implementation(Dependencies.ThirdParty.SQLDelight.androidDriver)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 31 KiB |
|
@ -2,8 +2,8 @@ package dev.msfjarvis.lobsters.ui.posts
|
|||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.asAndroidBitmap
|
||||
|
@ -28,7 +28,7 @@ class HeaderTest : ScreenshotTest {
|
|||
modifier = Modifier
|
||||
.background(color = Color(0xffffff))
|
||||
.fillMaxWidth()
|
||||
.fillMaxHeight(),
|
||||
.wrapContentHeight(),
|
||||
) {
|
||||
MonthHeader(month = Month.AUGUST)
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import androidx.compose.ui.text.font.FontWeight
|
|||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import coil.transform.CircleCropTransformation
|
||||
import com.star_zero.compose.flowlayout.FlowLayout
|
||||
import dev.chrisbanes.accompanist.coil.CoilImage
|
||||
import dev.msfjarvis.lobsters.R
|
||||
import dev.msfjarvis.lobsters.data.api.LobstersApi
|
||||
|
@ -131,11 +132,12 @@ fun TagRow(
|
|||
tags: List<String>,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Row(
|
||||
FlowLayout(
|
||||
modifier = Modifier.then(modifier),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
horizontalSpacing = 8.dp,
|
||||
verticalSpacing = 8.dp,
|
||||
) {
|
||||
tags.take(3).forEach { tag ->
|
||||
tags.forEach { tag ->
|
||||
Text(
|
||||
text = tag,
|
||||
modifier = Modifier
|
||||
|
|
|
@ -77,6 +77,7 @@ internal fun BaseAppModuleExtension.configureAndroidApplicationOptions(project:
|
|||
setProguardFiles(listOf("proguard-android-optimize.txt", "proguard-rules.pro"))
|
||||
}
|
||||
named("debug") {
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ object Dependencies {
|
|||
object ThirdParty {
|
||||
|
||||
const val accompanist = "dev.chrisbanes.accompanist:accompanist-coil:0.6.1"
|
||||
const val composeFlowLayout = "com.star-zero:compose-flowlayout:0.0.1"
|
||||
|
||||
object Moshi {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue