我正在使用一份可扩展的清单。 法典如下,并课以罚款。 但是,问题在于我想要提供一些大信息的一个群体的儿童,但它并未表明这一点。 这只是一个线。
public class list1 extends ExpandableListActivity {
private static final String NAME = "name";
private static final String time = "time";
private static final String IS_EVEN = "IS_EVEN";
private ExpandableListAdapter mAdapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
List<Map<String, String>> groupData = new ArrayList<Map<String, String>>();
List<List<Map<String, String>>> childData = new ArrayList<List<Map<String, String>>>();
final HashMap<String, String> info1 = new HashMap<String, String>();
info1.put(NAME, "information");
groupData.add(info1);
final HashMap<String, String> tt = new HashMap<String, String>();
tt.put(NAME, "time");
groupData.add(tt);
final HashMap<String, String> loc = new HashMap<String, String>();
loc.put(NAME, "Location");
groupData.add(loc);
List<Map<String, String>> childreninfo = new ArrayList<Map<String, String>>();
List<Map<String, String>> childrentime = new ArrayList<Map<String, String>>();
List<Map<String, String>> childrenloc = new ArrayList<Map<String, String>>();
Map<String, String> infochild = new HashMap<String, String>();
childreninfo.add(infochild);
infochild.put(NAME, "asnflabfbalv j;ajf;adf ;j; asjfsap sdjosdjosjdos dosjdosjdosjdos osfjsodfjsofjso osjfosjdfosjf s jsofjsojdsod jdosjdsosod jdsofjsojdfsofd jfosjdfsofjsof odjfsojfsodjosdjsod sojdosjdso djosjdosjds djsodj");
Map<String, String> timechild = new HashMap<String, String>();
childrentime.add(timechild);
timechild.put(NAME, "Childtime " + 1);
Map<String, String> locchild = new HashMap<String, String>();
childrenloc.add(locchild);
locchild.put(NAME, "Childloc " + 1);
childData.add(childreninfo);
childData.add(childrentime);
childData.add(childrenloc);
// Set up our adapter
mAdapter = new SimpleExpandableListAdapter(
this,
groupData,
android.R.layout.simple_expandable_list_item_1,
new String[] { NAME,time },
new int[] { android.R.id.text1, android.R.id.text2 },
childData,
android.R.layout.simple_expandable_list_item_2,
new String[] { NAME, IS_EVEN },
new int[] { android.R.id.text1, android.R.id.text2 }
);
setListAdapter(mAdapter);
}
}
参见:infochild.put();
,其中含有非常大的信息,但此处仅显示第1线信息。
我如何确定这一点,以显示所有信息?