Add Ukraine support motive

This commit is contained in:
Sylwester Zieliński
2022-03-09 14:35:06 +01:00
parent 9b9826d8bd
commit 3db9989daf
3 changed files with 35 additions and 17 deletions

View File

@@ -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))

View File

@@ -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 {

View File

@@ -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