Search code examples
androidandroid-gallery

Picture URLs for gallery sources Android


Hi im fairly new to this im trying to use image urls as sources for my gallery pictures but im having difficulty finding how this works, this is the code so far.

 public class ImageAdapter extends BaseAdapter {
       private static final int ITEM_WIDTH = 232;
       private static final int ITEM_HEIGHT = 150;

       private final int mGalleryItemBackground;
       private final Context mContext;

       private final Integer[] mImageIds = {
               R.drawable.pic1,
               R.drawable.pic2,
               R.drawable.pic3,


       };

where would i put the urls ?


Solution

  • If the URL's are from the web, there is some work to be done. Fortunately, there are many Libraries offering ImageView implementations that handle these scenarios.

    Check out LoopJ's SmartImageView

    Also look into GreenDroid for a more robust UI-builder implementation.