I have an ImageView with a bitmap drawable. There are different versions of the bitmap for each device density (hdpi, xhdpi, xxhdpi etc).
I want to position a TextView on top of the ImageView, and relative to the ImageView's position. e.g. 30px from the right, 50px from the top. The TextView needs to always be displayed in a certain part of the image, so its position will be different for each version of the image created for different screen densities.
Positioning with pixels seems to work. I'm able to create different XML layout files with pixel values for the different versions of the image (hdpi, xhdpi, etc). However, I'm not able to specify px units in dimen.xml
Is positioning with pixels the correct method here? Will positioning with pixels relative to the image work across different devices?