如果单击按钮,java将显示活动图像
我想在单击按钮时显示活动图像。但是,如果我没有被点击,显示正常的图像样式。我该怎么做?请帮助我
图标\主页\配置。xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:安卓="http://schemas.安卓.com/apk/res/安卓">
<item 安卓:state_pressed="true" 安卓:drawable="@drawable/home_button_hover" />
<item 安卓:state_focused="true" 安卓:drawable="@drawable/home_button_hover" />
<item 安卓:drawable="@drawable/home_button"/>
</selector>
# 1 楼答案
ImageView
btn_背景。xml