I have a `listView` where I display the profile picture of the person (a sort of school social media) and I store the link to those Images in a SQL database with their name and 2 other parameters.

Here is my `custom adapter`:

```
class customAdapter extends ArrayAdapter<String> {
public customAdapter(Context context, String[] friends) {
    super(context, R.layout.customrow, friends);
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    MyDBHandler  dbHandler = new MyDBHandler(getContext(), null, null, 1);
   Product product;
    LayoutInflater myinfl = LayoutInflater.from(getContext());
    View customview = myinfl.inflate(R.layout.customrow, parent, false);
    String singlefooditem  = getItem(position);
    TextView name = (TextView)customview.findViewById(R.id.rowText);
    ImageView img = (ImageView)customview.findViewById(R.id.profilePic);
    product = dbHandler.findProductName(singlefooditem);
   try {
        URL url = new URL(product.getImage());
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setDoInput(true);
        connection.connect();
        InputStream input = connection.getInputStream();

        Bitmap myBitmap = BitmapFactory.decodeStream(input);
        img.setImageBitmap(myBitmap);
    }catch (IOException e){

    }

    name.setText(singlefooditem);
    return customview;
}

```

Thats my `logcat:`

```
            at android.view.View.measure(View.java:17479)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364)
        at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:444)
        at android.view.View.measure(View.java:17479)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
        at android.view.View.measure(View.java:17479)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
        at android.view.View.measure(View.java:17479)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
        at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2532)
        at android.view.View.measure(View.java:17479)
        at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2262)
        at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1391)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1590)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6585)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
        at android.view.Choreographer.doCallbacks(Choreographer.java:603)
        at android.view.Choreographer.doFrame(Choreographer.java:573)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
        at android.os.Handler.handleCallback(Handler.java:733)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5586)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
        at dalvik.system.NativeStart.main(Native Method)

```