Make buttons react to tap
Bug: 153040823 Test: visual Change-Id: I2cd643160eed5efd2149f332329ea7033f88a069
This commit is contained in:
47
packages/SystemUI/res/anim/control_state_list_animator.xml
Normal file
47
packages/SystemUI/res/anim/control_state_list_animator.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="50"
|
||||
android:propertyName="scaleX"
|
||||
android:valueTo="0.97"
|
||||
android:valueType="floatType" />
|
||||
<objectAnimator
|
||||
android:duration="50"
|
||||
android:propertyName="scaleY"
|
||||
android:valueTo="0.97"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
||||
</item>
|
||||
<item>
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="250"
|
||||
android:propertyName="scaleX"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
<objectAnimator
|
||||
android:duration="250"
|
||||
android:propertyName="scaleY"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -24,6 +24,7 @@
|
||||
android:clickable="false"
|
||||
android:focusable="true"
|
||||
android:screenReaderFocusable="true"
|
||||
android:stateListAnimator="@anim/control_state_list_animator"
|
||||
android:layout_marginLeft="@dimen/control_base_item_margin"
|
||||
android:layout_marginRight="@dimen/control_base_item_margin"
|
||||
android:background="@drawable/control_background">
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
android:paddingRight="@dimen/global_actions_grid_item_side_margin"
|
||||
android:layout_marginRight="@dimen/control_base_item_margin"
|
||||
android:layout_marginLeft="@dimen/control_base_item_margin"
|
||||
android:stateListAnimator="@anim/control_state_list_animator"
|
||||
android:background="@drawable/control_background">
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/global_actions_grid_item_width"
|
||||
|
||||
Reference in New Issue
Block a user