コード例 #1
0
 private void getLoadData() {
   ApkEntity entity;
   for (int i = 0; i < 2; i++) {
     entity = new ApkEntity();
     entity.setName("程序名字" + m_ApkList.size());
     entity.setInfo("50w用户");
     entity.setDes("这是一个神奇的应用!");
     m_ApkList.add(entity);
   }
 }
コード例 #2
0
 @Override
 public View getView(int position, View convertView, ViewGroup parent) {
   ApkEntity entity = m_ApkList.get(position);
   ViewHolder holder;
   if (convertView == null) {
     holder = new ViewHolder();
     convertView = m_inflater.inflate(R.layout.listview_item_load_more, null);
     holder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
     holder.tv_des = (TextView) convertView.findViewById(R.id.tv_des);
     holder.tv_info = (TextView) convertView.findViewById(R.id.tv_info);
     convertView.setTag(holder);
   } else {
     holder = (ViewHolder) convertView.getTag();
   }
   holder.tv_name.setText(entity.getName());
   holder.tv_des.setText(entity.getDes());
   holder.tv_info.setText(entity.getInfo());
   return convertView;
 }