0

I am currently working with pictures in Android. I have begun to use the following size 400x280. The first unit everything worked great, then I used a device with a higher resolution. Unfortunately, then soon became clear that the size is too small.

I have:

//image.getLayoutParams().height = 280;
//image.getLayoutParams().width = 400;

left out.

So then I had a custom image to the size. Unfortunately therefore no longer fits into my dimension of the image.

EVX = getX ...
Evy = getY ...
        If ((EVX> 0) && (EVX <300) && (Evy> 0) && (Evy <300)) {
     // Do soemthing...
         }

This is to represent the intersection of the two circles, which are located in the image.

How can I enlarge the image? And my dimensions of the image area to maintain, adapt or?

I want to adjust the image to other devices while maintaining the intersection. So the exact area of the intersection. See IF query. Unfortunately, the IF query is not adapted to the new size of the image. And as I do not have an idea of how this might work. -- Transfer image area on new image size. --

devlog101010
  • 73
  • 1
  • 9

1 Answers1

1

This might solve your problem . What you need is the highest resolution images and then put those images in "drawable-nodpi" or just in "drawable" or "drawable-hdpi".

Community
  • 1
  • 1
Naveen Rao
  • 712
  • 6
  • 10
  • Okay i can imagine what you mean, ndpi and hdpi are folders in the "res." I also had to add more files in those folders, does it than automatically works ? – devlog101010 Jun 02 '15 at 12:00
  • 1
    Yes as mentioned in the above link . You just have to add most highest resolution copy of image in nodpi or drawable or hdpi folder . then those images will automatically resized according to different screens . – Naveen Rao Jun 02 '15 at 13:00
  • But if the image resolution is to high, is the Image area ever the same size or will ist be changed automatically for every picture size ? – devlog101010 Jun 02 '15 at 13:05
  • 1
    I havn't got your last comment . You just need to do: 1. Copy original Image in nodpi or drawable or hdpi folder. 2. Set this image in imageview . 3. Then run and test your app for image size in different devices with different screen sizes. – Naveen Rao Jun 02 '15 at 13:12