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

Commit 406be144 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use AutoSize for empty state CTA text" into main

parents 16125969 d66bb04e
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ import androidx.compose.foundation.lazy.grid.rememberLazyGridState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.selection.selectable
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.AutoSize
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
@@ -1024,11 +1026,14 @@ private fun EmptyStateCta(contentPadding: PaddingValues, viewModel: BaseCommunal
            horizontalAlignment = Alignment.CenterHorizontally,
        ) {
            val titleForEmptyStateCTA = stringResource(R.string.title_for_empty_state_cta)
            Text(
            BasicText(
                text = titleForEmptyStateCTA,
                style = MaterialTheme.typography.displaySmall,
                textAlign = TextAlign.Center,
                style =
                    MaterialTheme.typography.displaySmall.merge(
                        color = colors.onPrimary,
                        textAlign = TextAlign.Center,
                    ),
                autoSize = AutoSize.StepBased(maxFontSize = 36.sp, stepSize = 0.1.sp),
                modifier =
                    Modifier.focusable().semantics(mergeDescendants = true) {
                        contentDescription = titleForEmptyStateCTA