2024年3月9日发(作者:)

Android of listview

首先要有一个关于ListView的Item各个内容的java文件进行数据的获取及使用。

/*

*/

public class demo {

String demo;

public demo(String demo){

= demo;

}

public String getDemo(){

return demo;

}

}

然后对activity_编写

droid"

xmlns:tools="/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

tools:context="tivity">

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:layout_width="0dp"

android:layout_weight="2"

android:layout_height="wrap_content"

android:id="@+id/edit"/>