列表视图问题

| 我在列表视图中有问题..我想将不同的字段放在同一列表视图中,这可能吗? 像这样?
DBAdapter db = new DBAdapter(.this);
        db.open();
        List<String> ct = new ArrayList<String>();      
        ct = db.getAllAccounts();   
        List<String> sd = new ArrayList<String>();      
        sd = db.getAllAmount();         
        Account = (ListView) findViewById(R.id.ListView_addAccount);
        Account.setAdapter(new ArrayAdapter<String>(this,R.layout.list_contas_layout,R.id.text1,R.id.text2, ct,sd));
有这样的东西吗? 对我的英语感到抱歉;)     
已邀请:
        绝对。看一下
SimpleCursorAdapter
。我不确定您使用的是哪个数据库,但是对于这种情况,使用
Cursor
类是很正常的。否则,您将必须创建自己的自定义适配器。     

要回复问题请先登录注册