Touch Target Size
Views that can be interacted with must have a touch target size of at least 44 x 44 DP.
On a touch device, small controls are a usability issue for everyone. Additionally, people experiencing motor limitations have increased difficulty interacting with small targets.
- Identify the pixel density of your Android device.
- Utilize the view hierarchy inspector to confirm how big the control is in pixels.
- One of the following will happen:
- Accessible: Ensure the control is the correct number of density-independent pixels (dip).
- Inaccessible: The control is not either 44 dip wide or 44 dip high.
How to Fix
Button button = findViewById(R.id.an_accessible_button_yay) button.setMinimumHeight(44); button.setMinimumWidth(44);
<Button android:id="@+id/an_accessible_button_yay" android:minimumHeight="44dp" android:minimumWidth="44dp" android:text="@string/batman_likes_accessible_buttons" />