Make buttons react to tap

Bug: 153040823
Test: visual
Change-Id: I2cd643160eed5efd2149f332329ea7033f88a069
This commit is contained in:
Lucas Dupin
2020-04-13 14:42:43 -07:00
parent 3908fb22b6
commit 6843f576a2
3 changed files with 49 additions and 0 deletions

View 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>

View File

@@ -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">

View File

@@ -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"