Change text from other activity

北慕城南 提交于 2019-12-20 06:39:39

问题


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?


回答1:


i recently started learning about java events and listeners. I believe my SO question may help you. Here is the link to my question.

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.



来源:https://stackoverflow.com/questions/4909354/change-text-from-other-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!