zoukankan      html  css  js  c++  java
  • Android ImageView点击效果

    ImageView设置点击效果需要注意两点,第一个设置android:clickable="true",第二个 <item android:drawable="@drawable/button_n"/>属性必须放到最后才能生效

    <?xml version="1.0" encoding="utf-8"?><!--发现大类列表项--> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ivCategory" android:layout_width="@dimen/x110" android:layout_height="@dimen/x110" android:src="@drawable/bt_icon_pxb" android:clickable="true" android:background="@drawable/bt_discover_category"> </ImageView>


    <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_d" android:state_checked="true"/> <item android:drawable="@drawable/button_d" android:state_pressed="true"/> <item android:drawable="@drawable/button_n"/> </selector>
  • 相关阅读:
    蓝桥杯 大数定理
    蓝桥杯 密码发生器
    简单定时器的使用
    Eclipse中更改Project Explorer的字体
    列的别名修改
    ||拼接字符串
    SQL知识总结
    java 打开记事本
    报表使用分组
    js处理异步问题
  • 原文地址:https://www.cnblogs.com/baiyi168/p/6662342.html
Copyright © 2011-2022 走看看