在Android应用程序中,我使用adapter
填充ListView
控件,如下所示:
public class ChildActivity extends ActionBarActivity implements GetChildList {
private ListView lv_child;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_child);
List<String> array = new ArrayList<String>(); // for e.g array ["num1", "num2"]
lv_child = (ListView)findViewById(R.id.lv_child);
ArrayAdapter<String> adapterChild = new ArrayAdapter<String>(ChildActivity.this, android.R.layout.simple_list_item_1,array);
lv_child.setAdapter(adapterChild);
}
}
但我不明白simple_list_item_1
在此行ArrayAdapter<String> adapterChild = new ArrayAdapter<String>(ChildActivity.this, android.R.layout.simple_list_item_1,array);
声明的位置{/ 1}
请建议我,等待回复。