更改其他活动文本 [英] Change text from other activity
问题描述
我想改变另一个活动
与按钮的的EditText
的内容。
I want to change the contents of an EditText
on another Activity
with a button.
这两项活动都从同一个扩展。
Both activities extend from the same parent.
我怎样才能做到这一点?
How can I do this?
推荐答案
最近,我开始学习有关Java事件和监听。我相信我太问题可以帮助你。这里是链接到我的<一个href="http://stackoverflow.com/questions/4818851/java-events-handlers-and-listeners-question">question.
i recently started learning about java events and listeners. I believe my SO question may help you. Here is the link to my question.
基本上你可以做的是建立一个事件时,preSS按钮,然后有一个监听器,并有听众引发的变化。看看我的问题的更多细节。如果你看一看接受的答案,你会看到一个很好的例子,我做了。
Basically what you can do is set up an event for when they press the button and then have a listener and have the listener trigger the change. Take a look at my question for more detail. If you take a look at the accepted answer you will see a great example i made.
这篇关于更改其他活动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!