I want to add custom ripple effect on image button. But if I change background , it shows color effect behind the image. Also, I set table-row and image-button wrap content but still couldn't find solution. Please help me to set ripple effect only on image button not outside space.
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:gravity="center_horizontal"
android:layout_gravity="center_horizontal"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
>
<ImageButton
android:id="@+id/ess_btn_leave"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/leave"
android:background="?android:attr/selectableItemBackground"
/>
<ImageButton
android:id="@+id/ess_imgbtn_expence"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:background="@null"
android:src="@drawable/expence"
/>
</TableRow>