mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-19 15:34:26 +01:00
Add Ukraine support motive
This commit is contained in:
@@ -20,8 +20,8 @@ import androidx.compose.ui.res.stringResource
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import no.nordicsemi.android.nrftoolbox.R
|
|
||||||
import no.nordicsemi.android.material.you.ScreenSection
|
import no.nordicsemi.android.material.you.ScreenSection
|
||||||
|
import no.nordicsemi.android.nrftoolbox.R
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun FeatureButton(
|
fun FeatureButton(
|
||||||
@@ -43,6 +43,8 @@ fun FeatureButton(
|
|||||||
MaterialTheme.colorScheme.secondary
|
MaterialTheme.colorScheme.secondary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Box {
|
||||||
|
if (isRunning == true) {
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(iconId),
|
painter = painterResource(iconId),
|
||||||
contentDescription = stringResource(id = name),
|
contentDescription = stringResource(id = name),
|
||||||
@@ -54,6 +56,26 @@ fun FeatureButton(
|
|||||||
.background(color)
|
.background(color)
|
||||||
.padding(16.dp)
|
.padding(16.dp)
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
Image(
|
||||||
|
painter = painterResource(R.drawable.ic_ukraine_flag),
|
||||||
|
contentDescription = stringResource(id = name),
|
||||||
|
contentScale = ContentScale.Crop,
|
||||||
|
modifier = Modifier
|
||||||
|
.size(64.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
|
)
|
||||||
|
Image(
|
||||||
|
painter = painterResource(iconId),
|
||||||
|
contentDescription = stringResource(id = name),
|
||||||
|
contentScale = ContentScale.Crop,
|
||||||
|
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSecondary),
|
||||||
|
modifier = Modifier
|
||||||
|
.size(64.dp)
|
||||||
|
.padding(16.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
Spacer(modifier = Modifier.size(16.dp))
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package no.nordicsemi.android.service
|
package no.nordicsemi.android.service
|
||||||
|
|
||||||
enum class BleManagerStatus {
|
|
||||||
CONNECTING, OK, LINK_LOSS, DISCONNECTED, MISSING_SERVICE
|
|
||||||
}
|
|
||||||
|
|
||||||
sealed class BleManagerResult <T> {
|
sealed class BleManagerResult <T> {
|
||||||
|
|
||||||
fun isRunning(): Boolean {
|
fun isRunning(): Boolean {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ apply plugin: 'com.google.protobuf'
|
|||||||
|
|
||||||
protobuf {
|
protobuf {
|
||||||
protoc {
|
protoc {
|
||||||
artifact = 'com.google.protobuf:protoc:3.14.0'
|
artifact = 'com.google.protobuf:protoc:3.14.0:osx-x86_64'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generates the java Protobuf-lite code for the Protobufs in this project. See
|
// Generates the java Protobuf-lite code for the Protobufs in this project. See
|
||||||
|
|||||||
Reference in New Issue
Block a user