一.在代码中创建(不适用XML布局文件) 1.创建一个项目:ListViewLearn 2.修改MainActivity,继承于ListActivity 3.创建一个String数组,用来保存ListView中的现实内容 package com.learn.listviewlearn.utility; public class Util { public static final String[] COUNTRYS = { "中国", "美国", "俄罗斯…
GridView: A view that shows items in two-dimensional scrolling grid. The items in the grid come from the ListAdapter associated with this view. 简单说,GridView就是我们资源管理器平常见到的一个个文件的icon显示方式. 上面提及到了,GridView的Item是来自ListAdapter的,所以一般在Activity的onCreate使…