-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/11-handle-screenshots-types' into 'master'
Resolve "Handle screenshots types" Closes #85, #84, #83, #82, and #11 See merge request halcyonmobile/android-technical/multiplatform-playground!62
- Loading branch information
Showing
38 changed files
with
494 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: java -jar ./backend/build/libs/Backend.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 2 additions & 19 deletions
21
app/src/main/java/com/halcyonmobile/multiplatformplayground/ui/HomeScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
app/src/main/java/com/halcyonmobile/multiplatformplayground/ui/shared/Screenshots.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.halcyonmobile.multiplatformplayground.ui.shared | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.* | ||
import androidx.compose.foundation.lazy.LazyRowFor | ||
import androidx.compose.material.Card | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.ColorFilter | ||
import androidx.compose.ui.graphics.RectangleShape | ||
import androidx.compose.ui.layout.ContentScale | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.unit.dp | ||
import com.halcyonmobile.multiplatformplayground.R | ||
import com.halcyonmobile.multiplatformplayground.shared.util.ImageFile | ||
import com.halcyonmobile.multiplatformplayground.ui.theme.AppTheme | ||
import dev.chrisbanes.accompanist.coil.CoilImage | ||
|
||
@Composable | ||
fun Screenshots(screenshots: List<ImageFile>, onAddScreenshot: () -> Unit = {}, showAdd: Boolean = false) { | ||
Column { | ||
val items = if(showAdd) screenshots + null else screenshots | ||
Text( | ||
text = stringResource(id = R.string.screenshots), | ||
style = MaterialTheme.typography.h6, | ||
modifier = Modifier.padding(16.dp) | ||
) | ||
LazyRowFor(items = items, modifier = Modifier.padding(8.dp)) { | ||
if (it != null) { | ||
CoilImage( | ||
data = it.uri, | ||
modifier = Modifier.preferredSize(88.dp).padding(8.dp), | ||
contentScale = ContentScale.Crop | ||
) | ||
} else { | ||
Card( | ||
modifier = Modifier.preferredSize(88.dp).padding(8.dp), | ||
shape = RectangleShape, | ||
backgroundColor = AppTheme.colors.cardButton | ||
) { | ||
Box(Modifier.clickable(onClick = onAddScreenshot)) { | ||
Image( | ||
imageVector = vectorResource(id = R.drawable.ic_add_image), | ||
colorFilter = ColorFilter.tint(AppTheme.colors.secondary), | ||
modifier = Modifier.wrapContentSize().align(Alignment.Center) | ||
) | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "Start on Heroku: AppPortfolio backend", | ||
"description": "A barebones Kotlin app, which can easily be deployed to Heroku.", | ||
"name": "Start on Heroku: Multiplatform backend", | ||
"description": "Kotlin multiplatform backend", | ||
"image": "heroku/java", | ||
"addons": [ "heroku-postgresql" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.