是否可以将按钮的图像突出显示或更改为其他图像Onclick()按钮?专注于单击按钮
这是肯定的,你可以先得到使用两个按钮的参考findViewById()
方法我对按钮
<Button android:layout_height="wrap_content"
android:textColor="#000000"
android:gravity="center_horizontal|center_vertical" android:layout_gravity="center_horizontal|center_vertical"
android:focusableInTouchMode="true"
android:background="@drawable/button"
android:layout_width="wrap_content"
android:soundEffectsEnabled="true"
android:text="START"
android:focusable="true"
android:id="@+id/start"></Button
>
@绘制/按钮包含我想设置为我的按钮背景图像的图像......与按钮的onclick我想为一小部分的图像说明更改@ drawble /红..请帮助 – SKB
你可以进行相同的过程..它会工作得很好.. – ngesh
好吧..很好,当我这样做,我将能够完全改变图像...并不恢复到最初的形象... – SKB