eclipse - how to inflate layout as drawable in map android? -


i want show layout marker on google map can not inflate on map. can me solve this. , use polaris library. code written below:

final view altmarker = ((layoutinflater) getsystemservice(context.layout_inflater_service))             .inflate(r.layout.map_view, null);          altmarker.setdrawingcacheenabled(true);         altmarker.builddrawingcache();          @suppresswarnings("deprecation")         drawable drawable = new bitmapdrawable(altmarker.getdrawingcache());      final arraylist<annotation> annotations = new arraylist<annotation>();         (annotation[] region : sregions) {             (annotation annotation : region) {                 if (region == sfrance || region == sindia) {                     annotation.setmarker(drawable);                 }                 annotations.add(annotation);             }         } 

try this:

bitmap bitmap = bitmap.createbitmap(altmarker.getwidth(), altmarker.getheight(), bitmap.config.argb_4444); canvas canvas = new canvas(bitmap); view.draw(canvas); drawable drawable = new bitmapdrawable(bitmap); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -