Again ImageButton issues
- by pedr0
Thanks at all for all your help for now.I have another little issues
This is a portion of my layout which give me some problems:
<RelativeLayout android:id="@+id/card_address_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
>
<TextView
style="@style/card_field"
android:id="@+id/card_indirizzo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="8dp"
android:maxLength="35"
android:ellipsize="marquee"
/>
<ImageButton
android:id="@+id/card_address_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_toRightOf="@id/card_indirizzo"
android:src="@drawable/map_selector"
android:onClick="startMap"
android:padding="0dp" />
</RelativeLayout>
The image button src is a selector, in this case this one:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/map_b" /> <!-- pressed -->
<item android:drawable="@drawable/map_a" /> <!-- default -->
This is the result and I really don't understand why, why the image button has padding??!!!
Help meeeee!