From the course: Android App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Touch target size: Image button

Touch target size: Image button - Android Tutorial

From the course: Android App Development: Accessibility

Start my 1-month free trial

Touch target size: Image button

- [Instructor] Let's go back to our previous screen and go to the cards demo. In this example you can see that we have a lot of image buttons. The more options button at the top right is too small for touch, and although the buttons at the bottom of the card might already be okay with the touch area, let's make sure that they will never go below 48 dp in under any circumstance. So let's go back to our project files, and then let's first close our current files and locate the card list item and open it. The card list item will contain the entire view for each card. We can then scroll and find the more options button, which is this one. And now we can add the min height of minimum touch size and min width for the same value. If we click on the preview pane, we can see that this button now already meets the minimum size, but the drawable is at the center not at top right anymore. We could fix this problem by changing min height and min width with padding. So we can fix this problem by…

Contents