用ListView和Adapter就可以实现了啊

解决方案 »

  1.   

    把你的思路贴出来啊
    我曾经做的一个
    listview1.xml的代码
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="用户信息"
        />
    <ListView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/users"
        />        
    </LinearLayout>
    public class LView1 extends Activity { @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.listview1);
    ListView listView = (ListView)findViewById(R.id.users);
    ArrayList<HashMap<String,Object>> users 
                            = new ArrayList<HashMap<String,Object>>();
    for(int i=0;i<10;i++){
    HashMap<String,Object> user = new HashMap<String,Object>();
    user.put("img",R.drawable.icon );
    user.put("name", "用户->"+i);
    user.put("age", 20+i);
    users.add(user);
    }
    SimpleAdapter adapter = 
    new SimpleAdapter(this,users,R.layout.user,
                                new String[]{"img","name","age"},
                                new int[]{R.id.img,R.id.name,R.id.age});
    listView.setAdapter(adapter);
                   }
      

  2.   

    用listview是可以实现,但是完全不是正解。
    android有专门的api实现,即Preferences(PreferenceActivity)
    android 示例代码就有几个例子,楼主自己可以查看下,App目录下的Preferences。
      

  3.   

    谢谢大家 ApiDemos里面也找到了 AspireHouse大侠的例子也能用
    结贴~
      

  4.   

    看来楼主需要的是普通list而不是setting,我理解错了。希望没有误导你