Make the button easier to click

I have a button that on some phones is too difficult to click due to its size.

But creating a bigger rift.

Can it be explained that it has a larger “click block” than its visible area?

+7
source share
3 answers

Not sure if this can help:

If you use ImageButton without a background, and you set the value to Padding, your button will have a large area with clicks.

<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/img_close" android:id="@+id/btnClose" android:padding="25dip" android:background="#0000"></ImageButton> 
+19
source

It would be best to create a layout for each screen density / size .

+1
source

Not sure if this helps in your particular case, but you can get Linear / RelativeLayout to do clicks ( setClickable () ). So you can enable clicks on the parent Button element and get the desired effect?

0
source

All Articles