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
58 lines
2.8 KiB
XML
58 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2020 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.
|
|
-->
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:fitsSystemWindows="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<ImageView
|
|
android:id="@+id/global_screenshot_actions_container_background"
|
|
android:visibility="gone"
|
|
android:layout_height="0dp"
|
|
android:layout_width="0dp"
|
|
android:elevation="1dp"
|
|
android:background="@drawable/action_chip_container_background"
|
|
android:layout_marginStart="@dimen/screenshot_action_container_margin_horizontal"
|
|
app:layout_constraintBottom_toBottomOf="@+id/global_screenshot_actions_container"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="@+id/global_screenshot_actions_container"
|
|
app:layout_constraintEnd_toEndOf="@+id/global_screenshot_actions_container"/>
|
|
<HorizontalScrollView
|
|
android:id="@+id/global_screenshot_actions_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/screenshot_action_container_margin_horizontal"
|
|
android:layout_marginBottom="@dimen/screenshot_action_container_offset_y"
|
|
android:paddingHorizontal="@dimen/screenshot_action_container_padding_right"
|
|
android:paddingVertical="@dimen/screenshot_action_container_padding_vertical"
|
|
android:elevation="1dp"
|
|
android:scrollbars="none"
|
|
app:layout_constraintHorizontal_bias="0"
|
|
app:layout_constraintWidth_percent="1.0"
|
|
app:layout_constraintWidth_max="wrap"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/global_screenshot_preview"
|
|
app:layout_constraintEnd_toEndOf="parent">
|
|
<LinearLayout
|
|
android:id="@+id/global_screenshot_actions"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"/>
|
|
</HorizontalScrollView>
|
|
<include layout="@layout/global_screenshot_preview"/>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|