Currently the dismiss button just pops in once the animation is complete, which is somewhat jarring (and because the animation decelerates as it ends, it feels like there's a delay before the button actually appears). This change starts fading in the button while the animation is happening, matching its location to the preview at each animation update. Bug: 155415756 Fix: 155415756 Test: manual -- tested with ltr/rtl, portrait/landscape, and from overview vs keychord, all looked correct Change-Id: Ibd3ea2a4127d6fee87ec9b73d73f8f5a184d1417
66 lines
2.9 KiB
XML
66 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2011 The Android Open Source Project
|
|
~
|
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
~ you may not use this file except in compliance with the License.
|
|
~ You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License.
|
|
-->
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/global_screenshot_frame"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<ImageView
|
|
android:id="@+id/global_screenshot_actions_background"
|
|
android:layout_height="@dimen/screenshot_bg_protection_height"
|
|
android:layout_width="match_parent"
|
|
android:layout_gravity="bottom"
|
|
android:alpha="0.0"
|
|
android:src="@drawable/screenshot_actions_background_protection"/>
|
|
<ImageView
|
|
android:id="@+id/global_screenshot_animated_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="top|start"
|
|
android:visibility="gone"
|
|
android:elevation="@dimen/screenshot_preview_elevation"
|
|
android:background="@drawable/screenshot_rounded_corners" />
|
|
<ImageView
|
|
android:id="@+id/global_screenshot_flash"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:visibility="gone"
|
|
android:elevation="@dimen/screenshot_preview_elevation"
|
|
android:src="@android:color/white"/>
|
|
<com.android.systemui.screenshot.ScreenshotSelectorView
|
|
android:id="@+id/global_screenshot_selector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:visibility="gone"
|
|
android:pointerIcon="crosshair"/>
|
|
<include layout="@layout/global_screenshot_static"/>
|
|
<FrameLayout
|
|
android:id="@+id/global_screenshot_dismiss_button"
|
|
android:layout_width="@dimen/screenshot_dismiss_button_tappable_size"
|
|
android:layout_height="@dimen/screenshot_dismiss_button_tappable_size"
|
|
android:elevation="7dp"
|
|
android:visibility="gone"
|
|
android:contentDescription="@string/screenshot_dismiss_ui_description">
|
|
<ImageView
|
|
android:id="@+id/global_screenshot_dismiss_image"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_margin="@dimen/screenshot_dismiss_button_margin"
|
|
android:src="@drawable/screenshot_cancel"/>
|
|
</FrameLayout>
|
|
</FrameLayout>
|