0

アダプターの配列内のアイテムを取得するのに問題があります。誰かが私に光を見せてくれることを願っています...

私のアプリでは、多くのlistViewを使用し、配列アダプターを使用して行にデータを表示していますが、それで問題ありません。

私の活動

protected void onPostExecute(CarDetail list) {
   List<CarPhotos> photos = list.getPhotos();
         System.out.println("retrieving Photos");
         for (CarPhotos photo : photos) {
            PhotoArray.add(photo);
            System.out.println(photo);
        }
}
System.out.println(PhotoArray.size());
photoAdapter.notifyDataSetChanged();

私のアダプター(通常、これを使用してリスト内の行にデータを表示します)

public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder;
    //Get the current location object
    CarPhotos lm = (CarPhotos) getItem(position);


    ......etc
    holder.thumbnailname.setText(lm.getThumbnailName());
return convertView;
}

しかし、特定の行の位置ではなく、その配列内のカウントとすべてのアイテムを取得したい場合はどうすればよいですか?(例:すべてのサムネイル名をリストアップし、1セル/行でカウントします)

よろしくお願いします=)

4

0 に答える 0