View difference between Paste ID: VxUL4ZMw and UvGmMyFJ
SHOW: | | - or go back to the newest paste.
1
public View getView(int position, View convertView, ViewGroup parent) {
2
            //this is actually an instance variable
3
            import com.google.android.apps.iosched.util.ImageFetcher; mImageFetcher;
4
	 		
5
	 		final ListingItem item = listingItems.get(position);
6
	 		String url = item.getUrls().get(0).getLarge();
7
	 		
8
	 		if(convertView == null)
9
	 			convertView = vi.inflate(itemLayoutResourceId, null);	
10
	 		
11
	 		AQuery aq = listaq.recycle(convertView);
12
	 		
13
	 		aq.id(R.id.frontpage_item_title).text(item.getTitle());
14
	 		aq.id(R.id.frontpage_item_price).text(item.getPrice());
15
	 		aq.id(R.id.frontpage_item_seller).text(item.getShop().getShop_name());
16
	 		
17
			//load the image with the given url into the given view
18
	 		mImageFetcher.loadImage(url, (ImageView)convertView.findViewById(R.id.frontpage_item_image));
19
            
20-
            //the aquery veriosn, this has some issues with infinite scrolling, due to the redrawing of the
20+
			//the aquery veriosn, this has some issues with infinite scrolling, due to the redrawing of the
21-
            //views
21+
			//views
22-
//	 		aq.id(R.id.frontpage_item_image).image(url, true, false, 0, 0, null, AQuery.FADE_IN);
22+
			//aq.id(R.id.frontpage_item_image).image(url, true, false, 0, 0, null, AQuery.FADE_IN);
23
	 		 		 		
24
	 		aq.id(R.id.frontpage_item_seller).clicked(new OnClickListener() {
25
				@Override
26
				public void onClick(View v) {
27
					Intent i = new Intent(BaseListingsViewFragment.this.getActivity(), ShopInfoActivity.class);
28
					i.putExtra(Constants.SHOP_DATA_TAG,item.getShop());
29
					BaseListingsViewFragment.this.startActivity(i);
30
				}
31
			});
32
	 		
33
	 		return convertView;
34
	 	}