Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3188a86609 | ||
|
|
99b5dbd2d3 | ||
|
|
c87b915ed3 | ||
|
|
5df2399e84 |
@@ -6,11 +6,7 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace = "ru.omni_devel.cards"
|
||||
compileSdk {
|
||||
version = release(36) {
|
||||
minorApiLevel = 1
|
||||
}
|
||||
}
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "ru.omni_devel.cards"
|
||||
|
||||
@@ -6,17 +6,13 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace = "ru.omni_devel.cards"
|
||||
compileSdk {
|
||||
version = release(36) {
|
||||
minorApiLevel = 1
|
||||
}
|
||||
}
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "ru.omni_devel.cards"
|
||||
minSdk = 30
|
||||
targetSdk = 36
|
||||
versionCode = 21 // 1 at end for WearOS
|
||||
versionCode = 41 // 1 at end for WearOS
|
||||
versionName = "1.1"
|
||||
|
||||
}
|
||||
@@ -62,6 +58,5 @@ dependencies {
|
||||
implementation(libs.zxing.core)
|
||||
implementation(libs.zxing.android)
|
||||
implementation(libs.material)
|
||||
implementation("com.google.android.gms:play-services-wearable:18.1.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package ru.omni_devel.cards.presentation
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
@@ -36,29 +37,30 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("UnusedBoxWithConstraintsScope")
|
||||
@Composable
|
||||
fun App(cards: List<CardInfo>) {
|
||||
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
|
||||
val context = LocalContext.current
|
||||
|
||||
TransformingLazyColumn(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentPadding = PaddingValues(
|
||||
top = maxHeight * 0.4f,
|
||||
bottom = maxHeight * 0.4f
|
||||
),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
|
||||
val topBottomPadding = maxHeight * 0.4f
|
||||
|
||||
if (cards.isEmpty()) {
|
||||
item {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text("Sync with mobile APP to get started")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TransformingLazyColumn(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentPadding = PaddingValues(
|
||||
top = topBottomPadding,
|
||||
bottom = topBottomPadding
|
||||
),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
for (card in cards) {
|
||||
item {
|
||||
Button(
|
||||
|
||||
Reference in New Issue
Block a user