I have carema.png and carema_sel.png images in drawable-hdpi and a carema_btn.xml layout file. On Android 2.2 and 2.3 devices, things appear normal, but in android 4.0, the button is too big. Here is my layout:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/camera"/>
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@drawable/camera_sel" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/camera_sel" />
<item android:state_enabled="true" android:drawable="@drawable/camera"/>
</selector>
<Button
android:id="@+id/cameraButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/camera_btn" />
Why is the button appearing too large in Android 4.0?