Q:

Imageview not showing all image

Hello i am showing images in android app using gallery. I am having problem in displaying images. Some images are displayed some are not.
My adapter code is as follows:
ImageView iv;
            LinearLayout layoutnew = new LinearLayout(getApplicationContext());
            layoutnew.setOrientation(LinearLayout.VERTICAL);

            if (convertView == null)
            {
                iv = new ImageView(ctx);
                iv.setBackgroundDrawable(m_docs_ids[arg0]);
                iv.setScaleType(ImageView.ScaleType.FIT_XY);
                int temp =(int) (height/1.7f);
                int temp_y = (int) ((3*temp)/2.0f);
                iv.setLayoutParams(new LayoutParams( LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT ));

            }

 else
            {
                iv = (ImageView) convertView;
            }
            TextView tv = new TextView(ctx);

       //     tv.setText(m_docs.get(arg0).DocPath);
            tv.setTextColor(0xFFFFFFFF);
            tv.setPadding(0, 15, 0, 0);
            tv.setTag(arg0);
            tv.setTextSize(18);
            tv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT ));
            tv.setGravity(Gravity.CENTER);
            layoutnew.addView(iv);
            layoutnew.addView(tv);

            return layoutnew;

m_docs_id is a list of drawable type. i have debug it and found that it is getting correct entry. gallery is showing black for images which are not shown.
I found put that pictures placed in DCIM folders are not shown. all other images are shown

A:

Finally i got my problem solved. Issue was not in DCIM folder, issue was in size. The pictures taken from cell phone camera is very high and gallery was not getting those images. I set size in drawables of photo with mobile screen size. Now its running f9

