1

I want to display multiple images but when the number of images is too big they come off the screen. How can i fix this ? I want if the number of images is too big to go the rest of images on line down according to screen width and height.

To be more specific if I have to display 10 images and the window fits only five whole pictures I want the other rest 5 pictures to be displayed in the next line and so on.

for(int i=0;i<value1;i++){

            image = new ImageView(getApplicationContext());
            image.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT) );

            image.setImageResource(R.drawable.ic_launcher);

            linear1.addView(image);

        }
Laszlo Lugosi
  • 3,519
  • 1
  • 19
  • 17
nikosvas
  • 11
  • 1
  • 3

0 Answers0