[英]how do I check if a particular Layout is included in android from JAVA?
I would like to do the following: 我要执行以下操作:
setContentView(R.layout.product_details_editpage);
I want to check if product_details_editpage layout has another layout included in it? 我要检查product_details_editpage布局是否包含其他布局? If so, for the included layout components, I would like to reuse the handlers from elsewhere in the App.
如果是这样,对于包含的布局组件,我想重用App中其他位置的处理程序。
If the included layout has a button such as Logout, then I dont want to re-implement that logout button handler again in th eactivity that sets calls setContentView() above. 如果所包含的布局具有诸如Logout之类的按钮,那么我不想在设置上述setContentView()调用的活动中再次重新实现该Logout按钮处理程序。
What is the easiest way /best way to do this? 最简单的方法/最佳方法是什么?
agreed with above comments. 同意以上评论。 accept te discussion is closed.
接受讨论已关闭。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.