mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-24 01:44:23 +01:00
Add version name to home screen
This commit is contained in:
@@ -32,7 +32,7 @@ fun FeatureButton(
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(iconId),
|
||||
@@ -50,8 +50,16 @@ fun FeatureButton(
|
||||
|
||||
Text(
|
||||
text = stringResource(id = name),
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
modifier = Modifier.weight(1f),
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.size(16.dp))
|
||||
|
||||
Text(
|
||||
text = stringResource(id = nameCode),
|
||||
style = MaterialTheme.typography.headlineSmall,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalUriHandler
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import no.nordicsemi.android.theme.view.TitleAppBar
|
||||
@@ -33,7 +34,7 @@ fun HomeScreen() {
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text(
|
||||
text = "Bluetooth services",
|
||||
text = stringResource(id = R.string.bluetooth_services),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
@@ -89,7 +90,7 @@ fun HomeScreen() {
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text(
|
||||
text = "Utils services",
|
||||
text = stringResource(id = R.string.utils_services),
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
@@ -108,6 +109,15 @@ fun HomeScreen() {
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text(
|
||||
text = BuildConfig.VERSION_NAME,
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,8 @@
|
||||
<string name="uart_module">UART</string>
|
||||
<string name="uart_module_full">Serial port over BLE</string>
|
||||
<string name="dfu_module">DFU</string>
|
||||
<string name="dfu_module_full">DFU is now available in separate application.</string>
|
||||
<string name="dfu_module_full">Available in separate application.</string>
|
||||
|
||||
<string name="bluetooth_services">Bluetooth services</string>
|
||||
<string name="utils_services">Utils services</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user