Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public View getView(int position, View convertView, ViewGroup parent) {
- //this is actually an instance variable
- import com.google.android.apps.iosched.util.ImageFetcher; mImageFetcher;
- final ListingItem item = listingItems.get(position);
- String url = item.getUrls().get(0).getLarge();
- if(convertView == null)
- convertView = vi.inflate(itemLayoutResourceId, null);
- AQuery aq = listaq.recycle(convertView);
- aq.id(R.id.frontpage_item_title).text(item.getTitle());
- aq.id(R.id.frontpage_item_price).text(item.getPrice());
- aq.id(R.id.frontpage_item_seller).text(item.getShop().getShop_name());
- //load the image with the given url into the given view
- mImageFetcher.loadImage(url, (ImageView)convertView.findViewById(R.id.frontpage_item_image));
- //the aquery veriosn, this has some issues with infinite scrolling, due to the redrawing of the
- //views
- //aq.id(R.id.frontpage_item_image).image(url, true, false, 0, 0, null, AQuery.FADE_IN);
- aq.id(R.id.frontpage_item_seller).clicked(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent i = new Intent(BaseListingsViewFragment.this.getActivity(), ShopInfoActivity.class);
- i.putExtra(Constants.SHOP_DATA_TAG,item.getShop());
- BaseListingsViewFragment.this.startActivity(i);
- }
- });
- return convertView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement