简体   繁体   English

是否有可能从Android中另一个片段onclick的片段更新ui

[英]is it possible update ui from fragment from another fragment onclick in android

I am adding two fragment in one activity .I am setting onclick listener in fragment button view.In fragment click listener how to update the another fragment view in android 我在一个活动中添加两个片段。我在片段按钮视图中设置onclick侦听器。在片段单击侦听器中如何更新android中的另一个片段视图

Thanks for your help 谢谢你的帮助

you need to contact the activity first which will contact the second fragment. 您需要先联系活动,然后再联系第二个片段。 and also read this article on how to do it... 并阅读这篇有关如何做的文章...

http://developer.android.com/guide/topics/fundamentals/fragments.html#CommunicatingWithActivity http://developer.android.com/guide/topics/fundamentals/fragments.html#CommunicatingWithActivity

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM