我正在动态地创建Expandablelistview,如下所示,其中展开的列表包含edittext和复选框。
ExpandableListView epView = new ExpandableListView(this);
mAdapter = new MyExpandableListAdapter();
epView.setAdapter(mAdapter);
LinearLayout ll = (LinearLayout) findViewById(R.id.myLayout);
ll.addView(epView);在提交时,我的LinearLayout ll中有一个submit按钮,我正在尝试使用edittext id获取可扩展列表中的值。我正在获取显示在移动屏幕上的展开项的值,但是折叠的状态项为findviewbyid返回null。有没有人能帮我解决这个问题?
发布于 2011-12-09 16:54:08
ExpandableListView epView = new ExpandableListView(this);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(200,200);
mAdapter = new MyExpandableListAdapter();
epView.setAdapter(mAdapter);
LinearLayout ll = (LinearLayout) findViewById(R.id.myLayout);
ll.addView(epView,lp );https://stackoverflow.com/questions/5806433
复制相似问题