ImageView Setting the Click Effect is no use?
Solve
1.ImageView XML must be clickable and longclickable to True
<ImageView android:layout_width= "@dimen/x90" android:layout_height= "@dimen/x90" android:padding= "@dimen/x26" android:layout_gravity= "Right|center_vertical" android:clickable= "true" android:longclickable= "true" android:src= "@drawable/ Selector_home_toolbar_iv_add_bg "/>
2.selector inside the default display of the picture is placed below
<?xml version= "1.0" encoding= "Utf-8"?><selector xmlns:android= "http://schemas.android.com/ Apk/res/android ">
<!--the above two lines can also, state_enabled settings are OK- <!--<item android:state_enabled= "true" android:state_pressed = "true" android:drawable= "@drawable/home_toolbar_add_pressed"/>--> <!--<item Android:state_ Enabled= "false" android:drawable= "@drawable/home_toolbar_add_normal"/>--> <item android: State_pressed= "true" android:drawable= "@drawable/home_toolbar_add_pressed"/>
<item android:drawable= "@drawable/home_toolbar_add_normal"/>
</selector>
ImageView src image size can not change?
1.ImageView can not use scaletype= "Centerinside"
Xml
<ImageView android:id= "@+id/iv_item_close" android:layout_width= "@dimen/x78" android:layout_height= "@dimen/x68" android:padding= "@dimen/x10" android:layout _marginright= "@dimen/x20" android:src= "@mipmap/close" android:layout_gravity = "Center_vertical"/> <!--android:scaletype= "Centerinside"-
ImageView Setting the Click Effect is no use? ImageView src image size can not change?