kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
* Add description for node sort option button * Add description for location view button * Update description for channel url copy button * appease detekt --------- Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>pull/1706/head
rodzic
3bc4454c0e
commit
7902e21a4a
|
@ -471,9 +471,9 @@ private fun EditChannelUrl(
|
|||
else -> Icons.TwoTone.ContentCopy
|
||||
},
|
||||
contentDescription = when {
|
||||
isError -> stringResource(R.string.share)
|
||||
isError -> stringResource(R.string.copy)
|
||||
!isUrlEqual -> stringResource(R.string.send)
|
||||
else -> stringResource(R.string.share)
|
||||
else -> stringResource(R.string.copy)
|
||||
},
|
||||
tint = if (isError) {
|
||||
MaterialTheme.colors.error
|
||||
|
|
|
@ -162,7 +162,7 @@ private fun NodeSortButton(
|
|||
IconButton(onClick = { expanded = true }) {
|
||||
Icon(
|
||||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_twotone_sort_24),
|
||||
contentDescription = null,
|
||||
contentDescription = stringResource(R.string.node_sort_button),
|
||||
modifier = Modifier.heightIn(max = 48.dp),
|
||||
tint = MaterialTheme.colors.onSurface
|
||||
)
|
||||
|
|
|
@ -50,6 +50,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.viewinterop.AndroidView
|
||||
import androidx.fragment.app.activityViewModels
|
||||
|
@ -619,30 +620,32 @@ fun MapView(
|
|||
map.invalidate()
|
||||
},
|
||||
modifier = Modifier.align(Alignment.BottomCenter)
|
||||
) else Column(
|
||||
modifier = Modifier
|
||||
.padding(top = 16.dp, end = 16.dp)
|
||||
.align(Alignment.TopEnd),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
MapButton(
|
||||
onClick = ::showMapStyleDialog,
|
||||
icon = Icons.Outlined.Layers,
|
||||
contentDescription = R.string.map_style_selection,
|
||||
)
|
||||
MapButton(
|
||||
enabled = hasGps,
|
||||
icon = if (myLocationOverlay == null) {
|
||||
Icons.Outlined.MyLocation
|
||||
} else {
|
||||
Icons.Default.LocationDisabled
|
||||
},
|
||||
contentDescription = null,
|
||||
) else {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(top = 16.dp, end = 16.dp)
|
||||
.align(Alignment.TopEnd),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
if (context.hasLocationPermission()) {
|
||||
map.toggleMyLocation()
|
||||
} else {
|
||||
requestPermissionAndToggleLauncher.launch(context.getLocationPermissions())
|
||||
MapButton(
|
||||
onClick = ::showMapStyleDialog,
|
||||
icon = Icons.Outlined.Layers,
|
||||
contentDescription = R.string.map_style_selection,
|
||||
)
|
||||
MapButton(
|
||||
enabled = hasGps,
|
||||
icon = if (myLocationOverlay == null) {
|
||||
Icons.Outlined.MyLocation
|
||||
} else {
|
||||
Icons.Default.LocationDisabled
|
||||
},
|
||||
contentDescription = stringResource(R.string.toggle_my_position),
|
||||
) {
|
||||
if (context.hasLocationPermission()) {
|
||||
map.toggleMyLocation()
|
||||
} else {
|
||||
requestPermissionAndToggleLauncher.launch(context.getLocationPermissions())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<string name="desc_node_filter_clear">clear node filter</string>
|
||||
<string name="node_filter_include_unknown">Include unknown</string>
|
||||
<string name="node_filter_show_details">Show details</string>
|
||||
<string name="node_sort_button">Node sorting options</string>
|
||||
<string name="node_sort_alpha">A-Z</string>
|
||||
<string name="node_sort_channel">Channel</string>
|
||||
<string name="node_sort_distance">Distance</string>
|
||||
|
@ -346,4 +347,5 @@
|
|||
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
|
||||
<string name="udp_config">UDP Config</string>
|
||||
<string name="map_node_popup_details"><![CDATA[%s<br>Last heard: %s<br>Last position: %s<br>Battery: %s]]></string>
|
||||
<string name="toggle_my_position">Toggle my position</string>
|
||||
</resources>
|
||||
|
|
Ładowanie…
Reference in New Issue