图像按钮将图像 [英] Image button changes image
本文介绍了图像按钮将图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图像按钮,我想,图像按钮时pressed它改变了一个文本框中的文本,并将其改变为不同图像的图像我如何做到这一点?
I have a image button and i want that image button when pressed it changes the text in a textbox and it changes a image to a different image how do i do this?
推荐答案
您需要一个OnClickListener:的 http://developer.android.com/reference/android/view/View.OnClickListener.html
You need an OnClickListener: http://developer.android.com/reference/android/view/View.OnClickListener.html
当您点击文本可以使用(像)改变text.setText(新文本);
When clicked your text can be changed with (something like) text.setText("new text");
我会发现在一分钟内的链接,这将有助于更多的。
I'll find a link in a minute which will help more.
这篇关于图像按钮将图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文