app-ng: center align empty state placeholder text

Set textAlign = TextAlign.Center on the empty state placeholder text in
SuperuserScreen and ModuleScreen so multi-line messages are centered
horizontally instead of left-aligned.

Assisted-by: Gemini 3.7 Flash
This commit is contained in:
topjohnwu
2026-08-30 00:03:52 +00:00
committed by John Wu
parent a2affbb415
commit b8b140fafa
2 changed files with 6 additions and 2 deletions
@@ -65,6 +65,7 @@ import androidx.compose.ui.platform.LocalResources
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@@ -198,7 +199,8 @@ fun ModuleScreen(
Text(
text = stringResource(CoreR.string.module_empty),
style = MaterialTheme.typography.bodyLarge,
color = colorScheme.onSurfaceVariant
color = colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center
)
}
}
@@ -43,6 +43,7 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.google.accompanist.drawablepainter.rememberDrawablePainter
@@ -103,7 +104,8 @@ fun SuperuserScreen(
Text(
text = stringResource(CoreR.string.superuser_policy_none),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant
color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center
)
}
}