public class Data extends First {
private String [] data = {"版本号","用户信息","使用"};
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.forth);
ArrayAdapter<String> adapter= new ArrayAdapter<String>(Data.this,android.R.layout.simple_list_item_1,data);
ListView listview = (ListView)findViewById(R.id.listview);
listview.setAdapter(adapter);
}
}
我把相关的XML文件也po上来
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent">
为什么在虚拟机里显示不了?