Can use insets to make it appear the same small visual but have a 48dp tap target. Since delegating the touch to the 48dp, we can make the imageButton clickable to false as it's instead being used by the 48dp frame. - since there's no rtl catering for insets insets must have equal left and right values. * this means to reduce the end margin of the text to be given to the LEFT inset of the inset_rounded_action_button * reduce end margin of the linearlayout to be given to the right inset of the drawable. bug:379794419 Test manually photos: beforeRTL:https://drive.google.com/file/d/1-DzcjOTywgk6SFjfCX7AVnmfqsIfa1lh/view?usp=sharing afterRTL:https://drive.google.com/file/d/1UERlZ7XdoF0NhFuQE-oMulqgW9sDq9cy/view?usp=sharing before:https://drive.google.com/file/d/1h5_Ljsx1rLyKum1PK7IRwD14ps2SPKC3/view?usp=sharing after:https://drive.google.com/file/d/1b_8rgrC8WlDIdQuO7gOXS0MDNCISfxWr/view?usp=sharing Flag: EXEMPT bug fix Change-Id: I017d4d34ef6e42fa49543c5f787063b061c382dc
31 lines
1.3 KiB
XML
31 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
~ Copyright (C) 2024 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.
|
|
-->
|
|
|
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:insetTop="@dimen/inset_rounded_action_button"
|
|
android:insetBottom="@dimen/inset_rounded_action_button"
|
|
android:insetLeft="@dimen/inset_rounded_action_button"
|
|
android:insetRight="@dimen/inset_rounded_action_button">
|
|
<shape
|
|
android:shape="rectangle">
|
|
<solid android:color="@color/materialColorSurfaceContainerLow" />
|
|
<corners android:radius="@dimen/rounded_button_radius" />
|
|
<stroke
|
|
android:width="1dp"
|
|
android:color="@color/materialColorSurfaceContainerLow" />
|
|
</shape>
|
|
</inset>
|