动态添加组件,添加id,获取子控件,移除控件

动态创建关键代码(新添加的view是自己写的xml布局view) // 1. 获取自定义的 View Button button = (Button) LayoutInflater.from(this).inflate(R.layout.custom_layout_btn, linearLayout, false); // linearLayout 是父容器,通过findViewById()来获取
相关文章
相关标签/搜索