Loading packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,8 @@ <string name="screen_capture_toolbar_record_button">Record</string> <!-- Button text for screen sharing [CHAR LIMIT=35] --> <string name="screen_share_toolbar_share_button">Share</string> <!-- Text for app screen sharing thumbnail when no app is selected. [CHAR LIMIT=35] --> <string name="screen_share_no_select_app_thumbnail">Select an app to share</string> <!-- Content description for the app window screenshot button in the toolbar, when the capture mode is set to "screenshot". [CHAR LIMIT=NONE] --> <string name="screen_capture_toolbar_app_window_button_screenshot_a11y">Take screenshot of window</string> <!-- Content description for the app window screenshot button in the toolbar, when the capture mode is set to "record". [CHAR LIMIT=NONE] --> Loading packages/SystemUI/src/com/android/systemui/screencapture/sharescreen/largescreen/ui/compose/ShareContentSelector.kt +24 −8 Original line number Diff line number Diff line Loading @@ -38,7 +38,9 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.android.systemui.res.R import com.android.systemui.screencapture.common.ui.viewmodel.RecentTaskViewModel import com.android.systemui.screencapture.sharescreen.largescreen.ui.viewmodel.AudioSwitchViewModel import com.android.systemui.screencapture.sharescreen.largescreen.ui.viewmodel.ShareContentListViewModel Loading @@ -50,6 +52,7 @@ fun ShareContentSelector( recentTaskViewModelFactory: RecentTaskViewModel.Factory, ) { val selectedRecentTaskViewModel = shareContentListViewModel.selectedRecentTaskViewModel val itemSelected = selectedRecentTaskViewModel != null Surface(color = MaterialTheme.colorScheme.surfaceBright, shape = RoundedCornerShape(20.dp)) { Column( Loading @@ -75,7 +78,8 @@ fun ShareContentSelector( ) ItemPreview( preview = selectedRecentTaskViewModel?.thumbnail?.getOrNull()?.asImageBitmap(), modifier = Modifier.weight(1f).height(140.dp), modifier = Modifier.weight(1f).height(140.dp).width(230.dp), itemSelected = itemSelected, ) } DisclaimerText() Loading @@ -85,7 +89,11 @@ fun ShareContentSelector( } @Composable private fun ItemPreview(preview: ImageBitmap?, modifier: Modifier = Modifier) { private fun ItemPreview( preview: ImageBitmap?, modifier: Modifier = Modifier, itemSelected: Boolean, ) { Box( modifier = modifier Loading @@ -93,14 +101,22 @@ private fun ItemPreview(preview: ImageBitmap?, modifier: Modifier = Modifier) { .background(MaterialTheme.colorScheme.surfaceVariant), contentAlignment = Alignment.Center, ) { if (itemSelected) { if (preview != null) { Image( bitmap = preview, contentDescription = "preview", contentDescription = null, modifier = Modifier.matchParentSize(), contentScale = ContentScale.Fit, ) } } else { Text( text = stringResource(R.string.screen_share_no_select_app_thumbnail), color = MaterialTheme.colorScheme.primaryContainer, style = MaterialTheme.typography.labelMedium, ) } } } Loading Loading
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,8 @@ <string name="screen_capture_toolbar_record_button">Record</string> <!-- Button text for screen sharing [CHAR LIMIT=35] --> <string name="screen_share_toolbar_share_button">Share</string> <!-- Text for app screen sharing thumbnail when no app is selected. [CHAR LIMIT=35] --> <string name="screen_share_no_select_app_thumbnail">Select an app to share</string> <!-- Content description for the app window screenshot button in the toolbar, when the capture mode is set to "screenshot". [CHAR LIMIT=NONE] --> <string name="screen_capture_toolbar_app_window_button_screenshot_a11y">Take screenshot of window</string> <!-- Content description for the app window screenshot button in the toolbar, when the capture mode is set to "record". [CHAR LIMIT=NONE] --> Loading
packages/SystemUI/src/com/android/systemui/screencapture/sharescreen/largescreen/ui/compose/ShareContentSelector.kt +24 −8 Original line number Diff line number Diff line Loading @@ -38,7 +38,9 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.android.systemui.res.R import com.android.systemui.screencapture.common.ui.viewmodel.RecentTaskViewModel import com.android.systemui.screencapture.sharescreen.largescreen.ui.viewmodel.AudioSwitchViewModel import com.android.systemui.screencapture.sharescreen.largescreen.ui.viewmodel.ShareContentListViewModel Loading @@ -50,6 +52,7 @@ fun ShareContentSelector( recentTaskViewModelFactory: RecentTaskViewModel.Factory, ) { val selectedRecentTaskViewModel = shareContentListViewModel.selectedRecentTaskViewModel val itemSelected = selectedRecentTaskViewModel != null Surface(color = MaterialTheme.colorScheme.surfaceBright, shape = RoundedCornerShape(20.dp)) { Column( Loading @@ -75,7 +78,8 @@ fun ShareContentSelector( ) ItemPreview( preview = selectedRecentTaskViewModel?.thumbnail?.getOrNull()?.asImageBitmap(), modifier = Modifier.weight(1f).height(140.dp), modifier = Modifier.weight(1f).height(140.dp).width(230.dp), itemSelected = itemSelected, ) } DisclaimerText() Loading @@ -85,7 +89,11 @@ fun ShareContentSelector( } @Composable private fun ItemPreview(preview: ImageBitmap?, modifier: Modifier = Modifier) { private fun ItemPreview( preview: ImageBitmap?, modifier: Modifier = Modifier, itemSelected: Boolean, ) { Box( modifier = modifier Loading @@ -93,14 +101,22 @@ private fun ItemPreview(preview: ImageBitmap?, modifier: Modifier = Modifier) { .background(MaterialTheme.colorScheme.surfaceVariant), contentAlignment = Alignment.Center, ) { if (itemSelected) { if (preview != null) { Image( bitmap = preview, contentDescription = "preview", contentDescription = null, modifier = Modifier.matchParentSize(), contentScale = ContentScale.Fit, ) } } else { Text( text = stringResource(R.string.screen_share_no_select_app_thumbnail), color = MaterialTheme.colorScheme.primaryContainer, style = MaterialTheme.typography.labelMedium, ) } } } Loading