Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your convertView isn't null in case the <code>View</code> is recycled, so your <code>getView()</code> should be something like this: </p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if(view == null) { LayoutInflater inflater = getLayoutInflater(null); view = inflater.inflate(R.layout.right_panel_fragment_catalog_grid_item, parent, false); } CatalogItem item = getItem(position); ((TextView)view.findViewById(R.id.tvCatalogItemBasketName)).setText(item.name + " / " + item.code); Double gPrice = Double.valueOf(item.price) * Double.valueOf(item.count); ((TextView)view.findViewById(R.id.tvCatalogItemBasketCount)).setText(String.valueOf(item.count)); ((TextView)view.findViewById(R.id.tvCatalogItemBasketGeneralPrice)).setText(String.valueOf(gPrice)); ((TextView)view.findViewById(R.id.tvCatalogItemBasketDescription)).setText(item.description); final ImageView imgView = (ImageView)view.findViewById(R.id.ivCatalogItemBasketImage); String strURL = "http://myproject.ua/images/stock/" + item.folder + "/" + item.images + "_800x600.jpg"; ImageLoaderConfiguration config = ImageHelper.ImageConfig(getActivity().getApplicationContext()); DisplayImageOptions options = ImageHelper.ImageOptions(); ImageLoader imageLoader = ImageLoader.getInstance(); imageLoader.init(config); final ProgressBar pImgDialog = (ProgressBar)view.findViewById(R.id.pbImage); imageLoader.displayImage(strURL, imgView, options, new ImageLoadingListener() { @Override public void onLoadingStarted(String imageUri, View view) { pImgDialog.setVisibility(View.VISIBLE); imgView.setVisibility(View.GONE); } @Override public void onLoadingFailed(String imageUri, View view, FailReason failReason) { pImgDialog.setVisibility(View.GONE); imgView.setVisibility(View.VISIBLE); } @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { pImgDialog.setVisibility(View.GONE); imgView.setVisibility(View.VISIBLE); } @Override public void onLoadingCancelled(String imageUri, View view) { pImgDialog.setVisibility(View.GONE); imgView.setVisibility(View.VISIBLE); } }); view.setTag(item.catalog_id); return view; } </code></pre> <p>and since you have your own <code>ArrayList</code> inside your adapter, you have to update this one as well. Just add this method to your BasketAdapter: </p> <pre><code>public void changeModelList(List&lt;CatalogItem&gt; models) { this.data = models; notifyDataSetChanged(); } </code></pre> <p>and use it instead of <code>notifyDataSetChanged()</code>. it's not tested, but i think this is your problem.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload