本文介绍了调用的setContentView多次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以调用的setContentView多次,如果我的布局是相同的,但如果图像2的ImageView小部件得到交换??资源changes.for实例(这是逸岸所有这一切都发生在我的应用程序)
Can i call setcontentview multiple times if my layout is same but the resource changes.for instance if images get exchanged in 2 imageview widgets??(this is infact all that is happening in my app)
推荐答案
您可以切换的setContentView几次。不过,我已经学会在实践中,该UI元素不跨越。在每一个你设置视图时换句话说,你必须重新findViewById为您的UI元素。
You can switch the setContentView several times. However, I have learned in practice, that UI elements don't cross over. In other words each time you set the view, you have to re-findViewById for your UI elements.
这篇关于调用的setContentView多次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!