当当前视图只是下面显示的主布局视图时,如何在我的 ExpandableListView 的子项中访问我的自定义 RadioGroup:我有 - mainListView.xml //expandableListView
- group_row.xml //
textView -child_row.xml //has custom单选按钮
public void onCreate(Bundle savedInstanceState) {
try{
super.onCreate(savedInstanceState);
setContentView(R.layout.mainListView);
ExpandableListView elv = (ExpandableListView) findViewById(R.id.expandableListView1);
SimpleExpandableListAdapter expListAdapter =
new SimpleExpandableListAdapter(
getApplicationContext(),
createGroupList(), // Creating group List.
R.layout.group_row, // Group item layout XML.
new String[] { "Group Item" }, // the key of group item.
new int[] { R.id.row_name }, // ID of each group item.-Data under the key goes into this TextView.
createChildList(), // childData describes second-level entries.
R.layout.child_row, // Layout for sub-level entries(second level).
new String[] {"Sub Item"}, // Keys in childData maps to display.
new int[] { R.id.grp_child} // Data under the keys above go into these TextViews.
);
elv.setAdapter(expListAdapter); // setting the adapter in the list.
}catch(Exception e){
System.out.println("Errrr +++ " + e.getMessage());
}
answersGroup = (SegmentedRadioGroup) findViewById(need this from child_row);
answersGroup.setOnCheckedChangeListener(this);
}