Commit 1d7795e1 authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Chromium LUCI CQ

[Autofill] Increase touch target for checkbox.

Before this patch, the touch target for the checkbox in the credit card
editor was 32dp, which is smaller than the 48dp required for
accessibility.

This patch sets the minimum height of 48dp for the checkbox in the
credit card editor.

After this patch, the touch target for the checkbox in the credit card
editor is exactly 48dp in height.

Bug: 977272
Change-Id: I25b5de2145fdadef6b2c411fcbbc4b781500e18a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584462Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836338}
parent 0df34f97
...@@ -475,6 +475,8 @@ public class EditorDialog ...@@ -475,6 +475,8 @@ public class EditorDialog
checkbox.setId(R.id.payments_edit_checkbox); checkbox.setId(R.id.payments_edit_checkbox);
checkbox.setText(fieldModel.getLabel()); checkbox.setText(fieldModel.getLabel());
checkbox.setChecked(fieldModel.isChecked()); checkbox.setChecked(fieldModel.isChecked());
checkbox.setMinimumHeight(mContext.getResources().getDimensionPixelSize(
R.dimen.editor_dialog_checkbox_min_height));
checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<dimen name="pref_autofill_touch_target_padding">15dp</dimen> <dimen name="pref_autofill_touch_target_padding">15dp</dimen>
<!-- Editor dialog UI --> <!-- Editor dialog UI -->
<dimen name="editor_dialog_checkbox_min_height">48dp</dimen>
<dimen name="editor_dialog_textview_min_height">48dp</dimen> <dimen name="editor_dialog_textview_min_height">48dp</dimen>
<dimen name="editor_dialog_textview_margin_bottom">5dp</dimen> <dimen name="editor_dialog_textview_margin_bottom">5dp</dimen>
<dimen name="editor_dialog_section_small_spacing">8dp</dimen> <dimen name="editor_dialog_section_small_spacing">8dp</dimen>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment