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