Placing views exactly on image

Johnmcenroy

Active Member
Licensed User
Longtime User
I have edittext and an image in imageview. Image maintains aspect ratio , using modified code from this post - POST .I want to place edittext on certain place of image. But there are a lot of resolutions so it is a problem. What is the best way to do it ? Maybe there is a possibility to check pixel color of image and if it is transparent for example so place there edittext form ? Thanks.
 
Last edited:

Johnmcenroy

Active Member
Licensed User
Longtime User
Thank you very much Erel. How I understood I must do all calculations inside code and then edittext.setlayout with this parameters ? Also one problem that I have images for different densities - ldpi , mdpi , hdpi , xhdpi and xxhdpi made according to Google designer guidlines and i have only right places of edittext forms for mdpi image. I think I understand that doesn't matter because I know scale factor of image 0.75 , 1 , 1.5 ,2 ,3.
 
Last edited:
Upvote 0
Top