mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Fix/3894 talkback confusion (#3914)
This commit is contained in:
parent
00d678c42d
commit
f322eb31a0
5 changed files with 27 additions and 15 deletions
|
|
@ -32,9 +32,11 @@ import androidx.compose.animation.scaleOut
|
|||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.recalculateWindowInsets
|
||||
import androidx.compose.foundation.layout.safeDrawingPadding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.icons.Icons
|
||||
|
|
@ -71,6 +73,7 @@ import androidx.compose.ui.graphics.Brush
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.navigation.NavDestination
|
||||
|
|
@ -381,9 +384,16 @@ fun MainScreen(uIViewModel: UIViewModel = hiltViewModel(), scanModel: BTScanMode
|
|||
},
|
||||
selected = isSelected,
|
||||
label = {
|
||||
if (navSuiteType != NavigationSuiteType.ShortNavigationBarCompact) {
|
||||
Text(stringResource(destination.label))
|
||||
}
|
||||
Text(
|
||||
text = stringResource(destination.label),
|
||||
modifier =
|
||||
if (navSuiteType == NavigationSuiteType.ShortNavigationBarCompact) {
|
||||
Modifier.width(1.dp)
|
||||
.height(1.dp) // hide on phone - min 1x1 or talkback won't see it.
|
||||
} else {
|
||||
Modifier
|
||||
},
|
||||
)
|
||||
},
|
||||
onClick = {
|
||||
val isRepress = destination == topLevelDestination
|
||||
|
|
|
|||
|
|
@ -49,7 +49,12 @@ import org.meshtastic.core.ui.theme.StatusColors.StatusRed
|
|||
import org.meshtastic.core.ui.theme.StatusColors.StatusYellow
|
||||
|
||||
@Composable
|
||||
fun ConnectionsNavIcon(modifier: Modifier = Modifier, connectionState: ConnectionState, deviceType: DeviceType?) {
|
||||
fun ConnectionsNavIcon(
|
||||
modifier: Modifier = Modifier,
|
||||
connectionState: ConnectionState,
|
||||
deviceType: DeviceType?,
|
||||
contentDescription: String? = null,
|
||||
) {
|
||||
val tint = getTint(connectionState)
|
||||
|
||||
val (backgroundIcon, connectionTypeIcon) = getIconPair(deviceType = deviceType, connectionState = connectionState)
|
||||
|
|
@ -58,7 +63,7 @@ fun ConnectionsNavIcon(modifier: Modifier = Modifier, connectionState: Connectio
|
|||
|
||||
Icon(
|
||||
imageVector = backgroundIcon,
|
||||
contentDescription = null,
|
||||
contentDescription = contentDescription,
|
||||
tint = tint,
|
||||
modifier =
|
||||
modifier.drawWithContent {
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ import org.meshtastic.core.strings.mute_status_muted_for_hours
|
|||
import org.meshtastic.core.strings.mute_status_unmuted
|
||||
import org.meshtastic.core.strings.okay
|
||||
import org.meshtastic.core.strings.select_all
|
||||
import org.meshtastic.core.strings.share_contact
|
||||
import org.meshtastic.core.strings.unmute
|
||||
import org.meshtastic.core.ui.component.MainAppBar
|
||||
import org.meshtastic.core.ui.component.ScrollToTopEvent
|
||||
|
|
@ -227,7 +228,7 @@ fun ContactsScreen(
|
|||
),
|
||||
onClick = onNavigateToShare,
|
||||
) {
|
||||
Icon(Icons.Rounded.QrCode2, contentDescription = null)
|
||||
Icon(Icons.Rounded.QrCode2, contentDescription = stringResource(Res.string.share_contact))
|
||||
}
|
||||
},
|
||||
) { paddingValues ->
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@
|
|||
|
||||
<string name="channel_name">Channel Name</string>
|
||||
<string name="qr_code">QR code</string>
|
||||
<string name="application_icon">application icon</string>
|
||||
<string name="unknown_username">Unknown Username</string>
|
||||
<string name="send">Send</string>
|
||||
<string name="warning_not_paired">You haven't yet paired a Meshtastic compatible radio with this phone. Please pair a device and set your username.\n\nThis open-source application is in development, if you find problems please post on our forum: https://github.com/orgs/meshtastic/discussions.\n\nFor more information see our web page - www.meshtastic.org.</string>
|
||||
|
|
@ -753,6 +752,7 @@
|
|||
<string name="conversations">Conversations</string>
|
||||
<string name="nodes">Nodes</string>
|
||||
<string name="bottom_nav_settings">Settings</string>
|
||||
<string name="selected">Selected</string>
|
||||
<string name="set_your_region">Set your region</string>
|
||||
<string name="reply">Reply</string>
|
||||
<string name="map_reporting_summary">Your node will periodically send an unencrypted map report packet to the configured MQTT server, this includes id, long and short name, approximate location, hardware model, role, firmware version, LoRa region, modem preset and primary channel name.</string>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ import org.jetbrains.compose.resources.stringResource
|
|||
import org.meshtastic.core.database.model.Node
|
||||
import org.meshtastic.core.strings.R
|
||||
import org.meshtastic.core.strings.Res
|
||||
import org.meshtastic.core.strings.application_icon
|
||||
import org.meshtastic.core.strings.navigate_back
|
||||
import org.meshtastic.core.ui.component.preview.BooleanProvider
|
||||
import org.meshtastic.core.ui.component.preview.previewNode
|
||||
|
|
@ -84,13 +83,10 @@ fun MainAppBar(
|
|||
}
|
||||
} else {
|
||||
{
|
||||
IconButton(enabled = false, onClick = {}) {
|
||||
Icon(
|
||||
imageVector =
|
||||
ImageVector.vectorResource(id = org.meshtastic.core.ui.R.drawable.ic_meshtastic),
|
||||
contentDescription = stringResource(Res.string.application_icon),
|
||||
)
|
||||
}
|
||||
Icon(
|
||||
imageVector = ImageVector.vectorResource(id = org.meshtastic.core.ui.R.drawable.ic_meshtastic),
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
},
|
||||
actions = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue