其中isimple_list_item_1在适配器参数android java中声明

时间:2014-12-02 14:09:05

标签: java android listview array-address

在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}

请建议我,等待回复。

0 个答案:

没有答案