mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2026-01-09 09:44:22 +01:00
Add fixes to UART profile
This commit is contained in:
@@ -74,7 +74,7 @@ abstract class NotificationService : LifecycleService() {
|
||||
return NotificationCompat.Builder(this, CHANNEL_ID)
|
||||
.setContentTitle(getString(R.string.app_name))
|
||||
.setContentText(getString(messageResId, "Device"))
|
||||
.setSmallIcon(R.drawable.ic_notification_icon)
|
||||
.setSmallIcon(R.drawable.ic_launcher_foreground)
|
||||
.setColor(ContextCompat.getColor(this, R.color.md_theme_primary))
|
||||
.setContentIntent(pendingIntent)
|
||||
.build()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="1024dp"
|
||||
android:height="1024dp"
|
||||
android:tint="#ffffff"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -68,6 +69,7 @@ fun StringListView(config: StringListDialogConfig) {
|
||||
Image(
|
||||
modifier = Modifier.padding(horizontal = 4.dp),
|
||||
painter = painterResource(it),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurfaceVariant),
|
||||
contentDescription = "Content image",
|
||||
)
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -21,6 +21,7 @@ import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -83,7 +84,7 @@ internal fun UARTAddMacroDialog(macro: UARTMacro?, onEvent: (UARTViewEvent) -> U
|
||||
val background = if (selectedIcon.value == icon) {
|
||||
MaterialTheme.colorScheme.primaryContainer
|
||||
} else {
|
||||
MaterialTheme.colorScheme.secondaryContainer
|
||||
Color.Transparent
|
||||
}
|
||||
|
||||
Image(
|
||||
@@ -97,7 +98,6 @@ internal fun UARTAddMacroDialog(macro: UARTMacro?, onEvent: (UARTViewEvent) -> U
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
item(span = { GridItemSpan(GRID_SIZE) }) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
|
||||
@@ -155,9 +155,18 @@ private fun OutputSection(records: List<UARTOutputRecord>, onEvent: (UARTViewEve
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
SectionTitle(resId = R.drawable.ic_output, title = stringResource(R.string.uart_output), modifier = Modifier)
|
||||
SectionTitle(
|
||||
resId = R.drawable.ic_output,
|
||||
title = stringResource(R.string.uart_output),
|
||||
modifier = Modifier
|
||||
)
|
||||
|
||||
Icon(Icons.Default.Delete, contentDescription = "Clear items.", modifier = Modifier.clickable { onEvent(ClearOutputItems) })
|
||||
IconButton(onClick = { onEvent(ClearOutputItems) }) {
|
||||
Icon(
|
||||
Icons.Default.Delete,
|
||||
contentDescription = "Clear items.",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Reference in New Issue
Block a user