@@ -19,6 +19,8 @@ import androidx.compose.ui.text.style.TextAlign
1919import androidx.compose.ui.unit.dp
2020import androidx.compose.material.icons.Icons
2121import androidx.compose.material.icons.filled.*
22+ import androidx.compose.ui.graphics.asImageBitmap
23+ import androidx.core.graphics.drawable.toBitmap
2224
2325private fun SafetyLevel.badgeColorScheme (): Pair <Color , Color > =
2426 when (this ) {
@@ -46,7 +48,10 @@ fun AppDetailsScreen(
4648 var isDisabling by remember { mutableStateOf(false ) }
4749 var isUninstalling by remember { mutableStateOf(false ) }
4850 var isRestoring by remember { mutableStateOf(false ) }
49-
51+ val appIconBitmap = remember(appData.icon) {
52+ appData.icon?.toBitmap(width = 240 , height = 240 )?.asImageBitmap()
53+ }
54+
5055 Scaffold (
5156 topBar = {
5257 TopAppBar (
@@ -73,9 +78,9 @@ fun AppDetailsScreen(
7378 .background(MaterialTheme .colorScheme.surfaceVariant),
7479 contentAlignment = Alignment .Center
7580 ) {
76- if (appData.iconBitmap != null ) {
81+ if (appIconBitmap != null ) {
7782 Image (
78- bitmap = appData.iconBitmap ,
83+ bitmap = appIconBitmap ,
7984 contentDescription = null ,
8085 modifier = Modifier .fillMaxSize(),
8186 contentScale = ContentScale .Fit
0 commit comments