Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d4783c authored by Shrisha Udupa's avatar Shrisha Udupa Committed by shuanghao
Browse files

Fix time overlap issue in Sign-in Options screen of Credential Manager

There is an issue of time overlapping with other content as the user
scrolls in Sign-in options screen of Address book app in Credential
Manager.

This change fixes the issue by changing the columnState of
MultiCredentialsFlattenScreen from being set to be laid out directly
below the time text to being passed as a parameter through the
scrollable just like the other screens.

Bug: 377251580
Test: Open Address Book -> Login -> Sign-in options. Scroll through
the screen and check that the time text at the top doesn't overlap
with other content in the screen. Screenrecording of the fix attached
in the bug.

Change-Id: I9bf964a6783dfb088f9f74ee063de7d75386e8f8
parent f757160b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ fun WearApp(
        scrollable(Screen.MultipleCredentialsScreenFlatten.route) {
            MultiCredentialsFlattenScreen(
                credentialSelectorUiState = (remember { uiState } as MultipleEntry),
                columnState = it.columnState,
                flowEngine = flowEngine,
            )
        }
+4 −4
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ import com.android.credentialmanager.model.get.CredentialEntryInfo
import com.android.credentialmanager.ui.components.CredentialsScreenChipSpacer
import com.google.android.horologist.annotations.ExperimentalHorologistApi
import com.google.android.horologist.compose.layout.ScalingLazyColumn
import com.google.android.horologist.compose.layout.rememberColumnState
import com.google.android.horologist.compose.layout.ScalingLazyColumnState
import com.google.android.horologist.compose.layout.ScalingLazyColumnDefaults
import androidx.compose.ui.text.style.TextAlign
import androidx.wear.compose.material.MaterialTheme as WearMaterialTheme
@@ -45,6 +45,7 @@ import androidx.wear.compose.material.MaterialTheme as WearMaterialTheme
 * Screen that shows multiple credentials to select from, grouped by accounts
 *
 * @param credentialSelectorUiState The app bar view model.
 * @param columnState ScalingLazyColumn configuration to be be applied
 * @param modifier styling for composable
 * @param flowEngine [FlowEngine] that updates ui state for this screen
 */
@@ -52,15 +53,14 @@ import androidx.wear.compose.material.MaterialTheme as WearMaterialTheme
@Composable
fun MultiCredentialsFlattenScreen(
    credentialSelectorUiState: MultipleEntry,
    columnState: ScalingLazyColumnState,
    flowEngine: FlowEngine,
) {
    val selectEntry = flowEngine.getEntrySelector()
    Row {
        Spacer(Modifier.weight(0.052f)) // 5.2% side margin
        ScalingLazyColumn(
            columnState = rememberColumnState(
                ScalingLazyColumnDefaults.belowTimeText(horizontalAlignment = Alignment.Start),
            ),
            columnState = columnState,
            modifier = Modifier.weight(0.896f).fillMaxSize(), // 5.2% side margin
        ) {