毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> 移动平台 >> 正文

You must supply a resource ID for a TextView

更新时间:2014-11-22:  来源:毕业论文
sp;      address.setType(MainActivity.this.getString(R.string.delivery));
                        break;
                }
 
                Toast.makeText(MainActivity.this, address.toString(), Toast.LENGTH_SHORT)
                        .show();
                adapter.add(address);
            }
        });
 
        lv_address = (ListView) findViewById(R.id.lv_address);
        Log.d(TAG, "设置 Fancy List Item");
        this.adapter = new ArrayAdapter<Address>(MainActivity.this, R.layout.fancy_list_item, listAddress);
        lv_address.setAdapter(this.adapter);
    }
 
    class AddressAdapter extends ArrayAdapter<Address> {
        public AddressAdapter() {
            super(MainActivity.this, R.layout.fancy_list_item, listAddress);
            Log.d(TAG, "构造Fancy List Item");
        }
 
        @Override
        public int getCount() {
            return super.getCount();
        }
 
        @Override
        public long getItemId(int position) {
            return super.getItemId(position);
        }
 
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            //return super.getView(position, convertView, parent);
            View rowView = convertView;
            AddressHolder holder = null;
            if (rowView == null) {
                Log.d(TAG, "位置" + position + ";开始加载View");
                LayoutInflater layoutInflater = getLayoutInflater();
                rowView = layoutInflater.inflate(R.layout.fancy_list_item, parent, false);
                Log.d(TAG, "位置" + position + ";开始加载完成");
                holder = new AddressHolder(rowView);
                Log.d(TAG, "位置" + position + ";设置完成");
                rowView.setTag(holder);
 
            } else {
                holder = (AddressHolder) rowView.getTag();
            }
 
            holder.populateFrom(listAddress.get(position));
 
            return (rowView);
        }
    }
 
    static class AddressHolder {
        private TextView name = null;
        private TextView address = null;
        private ImageView icon = null;
        private View rowView = null;
 
        AddressHolder(View r

上一页  [1] [2] [3] [4] 下一页

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。