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

 

<ImageView
                    android:id="@+id/patrol_buzzer_btn"
                    android:layout_width="80dp"
                    android:layout_height="80dp"
                    android:src="@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="true"

 

artillery_buzzer

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

 

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

上一篇:ArcMap修改粘滞移动容差防止要素在选择时无意拖动移动


下一篇:Android Studio模拟器出错,提示Application Installation Failed, Installation failed with message Failed to establish session.