Android动态添加findviewbyid的Expandablelistview返回null

Android动态添加findviewbyid的Expandablelistview返回null,android,null,expandablelistview,Android,Null,Expandablelistview,我正在动态创建Expandablelistview,如下所示,其中展开的列表包含edittext和复选框 ExpandableListView epView = new ExpandableListView(this); mAdapter = new MyExpandableListAdapter(); epView.setAdapter(mAdapter); LinearLayout ll = (LinearLayout) findViewById(R.id.myLayout); ll.add

我正在动态创建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。有人能帮我找到解决方案吗?

我的一个朋友做了一个很好的教程,检查这个添加布局参数来设置宽度和高度
              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 );