selector的使用,android:clickable="true"

少年辛苦终身事,莫向光阴惰寸功。这篇文章主要讲述selector的使用,android:clickable=" true" 相关的知识,希望能为你提供帮助。
 

< ImageView android:id="@+id/patrol_buzzer_btn" android:layout_width="80dp" android:layout_height="80dp" android:src="https://www.songbingjia.com/android/@drawable/selector_buzzer" android:clickable="true" app:layout_constraintBottom_toTopOf="@+id/patrol_btn" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />

 
< ?xml version="1.0" encoding="utf-8"?> < selector xmlns:android="http://schemas.android.com/apk/res/android"> < item android:drawable="@drawable/artillery_buzzer_pressed" android:state_pressed="true" /> < item android:drawable="@drawable/artillery_buzzer" android:state_pressed="false"/> < /selector>

 
artillery_buzzer_pressed

selector的使用,android:clickable=&quot;true&quot;

文章图片

 
artillery_buzzer

selector的使用,android:clickable=&quot;true&quot;

文章图片

【selector的使用,android:clickable=" true" 】 

    推荐阅读