在MainActivity中获取OneActivity中的ll_image控件
其中 OneActivity对应的layout是 item_style_item
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.item_style_item, null);ll_image = (LinearLayout) view.findViewById(R.id.ll_image);
本文介绍如何在MainActivity中获取OneActivity布局中的ll_image控件。通过LayoutInflater加载item_style_item布局文件,并使用findViewById方法找到目标控件。
288

被折叠的 条评论
为什么被折叠?



