private ListAdapter createOfferListAdapter(final List<Offer> offers){
  List<Map<String,Object>> data=new ArrayList<>();
  for (  Offer offer : offers) {
    Map<String,Object> map=new HashMap<>();
    map.put("offerIcon",offer.getImageUrl());
    map.put("offerTitle",offer.getTitle());
    map.put("offerDetails",offer.getDescription());
    data.add(map);
  }
  SimpleAdapter adapter=new SimpleAdapter(PlaceDetailsActivity.this,data,R.layout.offer_item,new String[]{"offerIcon","offerTitle","offerDetails"},new int[]{R.id.offer_Image,R.id.offer_name,R.id.offer_description});
  adapter.setViewBinder(new ImageUrlViewBinder(R.id.offer_Image));
  return adapter;
}

private ListAdapter createOfferListAdapter ( final List < Offer > offers ) { List < Map < String , Object > > data = new ArrayList < > ( ) ; for ( Offer offer : offers ) { Map < String , Object > map = new HashMap < > ( ) ; map . put ( "offerIcon" , offer . getImageUrl ( ) ) ; map . put ( "offerTitle" , offer . getTitle ( ) ) ; map . put ( "offerDetails" , offer . getDescription ( ) ) ; data . add ( map ) ; } SimpleAdapter adapter = new SimpleAdapter ( PlaceDetailsActivity . this , data , R . layout . offer_item , new String [ ] { "offerIcon" , "offerTitle" , "offerDetails" } , new int [ ] { R . id . offer_Image , R . id . offer_name , R . id . offer_description } ) ; adapter . setViewBinder ( new ImageUrlViewBinder ( R . id . offer_Image ) ) ; return adapter ; }
creates listadapter populated with offer information .
