Loading packages/SystemUI/res/layout/screenshot_shelf.xml +16 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,22 @@ android:clickable="true" app:layout_constraintStart_toStartOf="@id/screenshot_preview_border" app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/> <!-- Keep the same dimension with screenshot_preview. --> <ImageView android:id="@+id/screenshot_preview_blur" android:layout_width="@dimen/overlay_x_scale" android:layout_height="wrap_content" android:layout_marginStart="@dimen/overlay_border_width" android:layout_marginBottom="@dimen/overlay_border_width" android:layout_gravity="center" android:elevation="4dp" android:contentDescription="@string/screenshot_edit_description" android:scaleType="fitEnd" android:background="@drawable/overlay_preview_background" android:adjustViewBounds="true" android:visibility="invisible" app:layout_constraintStart_toStartOf="@id/screenshot_preview_border" app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/> <ImageView android:id="@+id/screenshot_badge" android:layout_width="56dp" Loading packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ constructor( } screenshotPreview = view.screenshotPreview thumbnailObserver.setViews( view.screenshotPreview, view.blurredScreenshotPreview, view.requireViewById(R.id.screenshot_preview_border) ) } Loading packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import kotlin.math.max class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) { lateinit var screenshotPreview: ImageView lateinit var blurredScreenshotPreview: ImageView private lateinit var screenshotStatic: ViewGroup var onTouchInterceptListener: ((MotionEvent) -> Boolean)? = null Loading @@ -48,6 +49,7 @@ class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : // Get focus so that the key events go to the layout. isFocusableInTouchMode = true screenshotPreview = requireViewById(R.id.screenshot_preview) blurredScreenshotPreview = requireViewById(R.id.screenshot_preview_blur) screenshotStatic = requireViewById(R.id.screenshot_static) actionsContainerBackground = requireViewById(R.id.actions_container_background) dismissButton = requireViewById(R.id.screenshot_dismiss_button) Loading packages/SystemUI/src/com/android/systemui/screenshot/ui/binder/ScreenshotShelfViewBinder.kt +3 −0 Original line number Diff line number Diff line Loading @@ -55,8 +55,10 @@ object ScreenshotShelfViewBinder { view.onTouchInterceptListener = { swipeGestureListener.onMotionEvent(it) } val previewView: ImageView = view.requireViewById(R.id.screenshot_preview) val previewViewBlur: ImageView = view.requireViewById(R.id.screenshot_preview_blur) val previewBorder = view.requireViewById<View>(R.id.screenshot_preview_border) previewView.clipToOutline = true previewViewBlur.clipToOutline = true val actionsContainer: LinearLayout = view.requireViewById(R.id.screenshot_actions) val dismissButton = view.requireViewById<View>(R.id.screenshot_dismiss_button) dismissButton.visibility = if (viewModel.showDismissButton) View.VISIBLE else View.GONE Loading @@ -72,6 +74,7 @@ object ScreenshotShelfViewBinder { viewModel.preview.collect { bitmap -> if (bitmap != null) { setScreenshotBitmap(previewView, bitmap) setScreenshotBitmap(previewViewBlur, bitmap) previewView.visibility = View.VISIBLE previewBorder.visibility = View.VISIBLE } else { Loading Loading
packages/SystemUI/res/layout/screenshot_shelf.xml +16 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,22 @@ android:clickable="true" app:layout_constraintStart_toStartOf="@id/screenshot_preview_border" app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/> <!-- Keep the same dimension with screenshot_preview. --> <ImageView android:id="@+id/screenshot_preview_blur" android:layout_width="@dimen/overlay_x_scale" android:layout_height="wrap_content" android:layout_marginStart="@dimen/overlay_border_width" android:layout_marginBottom="@dimen/overlay_border_width" android:layout_gravity="center" android:elevation="4dp" android:contentDescription="@string/screenshot_edit_description" android:scaleType="fitEnd" android:background="@drawable/overlay_preview_background" android:adjustViewBounds="true" android:visibility="invisible" app:layout_constraintStart_toStartOf="@id/screenshot_preview_border" app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/> <ImageView android:id="@+id/screenshot_badge" android:layout_width="56dp" Loading
packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ constructor( } screenshotPreview = view.screenshotPreview thumbnailObserver.setViews( view.screenshotPreview, view.blurredScreenshotPreview, view.requireViewById(R.id.screenshot_preview_border) ) } Loading
packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import kotlin.math.max class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) { lateinit var screenshotPreview: ImageView lateinit var blurredScreenshotPreview: ImageView private lateinit var screenshotStatic: ViewGroup var onTouchInterceptListener: ((MotionEvent) -> Boolean)? = null Loading @@ -48,6 +49,7 @@ class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : // Get focus so that the key events go to the layout. isFocusableInTouchMode = true screenshotPreview = requireViewById(R.id.screenshot_preview) blurredScreenshotPreview = requireViewById(R.id.screenshot_preview_blur) screenshotStatic = requireViewById(R.id.screenshot_static) actionsContainerBackground = requireViewById(R.id.actions_container_background) dismissButton = requireViewById(R.id.screenshot_dismiss_button) Loading
packages/SystemUI/src/com/android/systemui/screenshot/ui/binder/ScreenshotShelfViewBinder.kt +3 −0 Original line number Diff line number Diff line Loading @@ -55,8 +55,10 @@ object ScreenshotShelfViewBinder { view.onTouchInterceptListener = { swipeGestureListener.onMotionEvent(it) } val previewView: ImageView = view.requireViewById(R.id.screenshot_preview) val previewViewBlur: ImageView = view.requireViewById(R.id.screenshot_preview_blur) val previewBorder = view.requireViewById<View>(R.id.screenshot_preview_border) previewView.clipToOutline = true previewViewBlur.clipToOutline = true val actionsContainer: LinearLayout = view.requireViewById(R.id.screenshot_actions) val dismissButton = view.requireViewById<View>(R.id.screenshot_dismiss_button) dismissButton.visibility = if (viewModel.showDismissButton) View.VISIBLE else View.GONE Loading @@ -72,6 +74,7 @@ object ScreenshotShelfViewBinder { viewModel.preview.collect { bitmap -> if (bitmap != null) { setScreenshotBitmap(previewView, bitmap) setScreenshotBitmap(previewViewBlur, bitmap) previewView.visibility = View.VISIBLE previewBorder.visibility = View.VISIBLE } else { Loading