Thanks Martin, Your solution worked. Is it the same for the html drawables as well? I did a sample code for Html drawable. Even the SDU value of drawable is 1, the drawable is larger than the target image. The code is like following. The width of the image is also same to 500px.
Think of 1 SDU as the height of your target image. 1 SDU is totally independent from the actual pixel size.
When you set the height (second parameter in the constructor) of your ImageDrawable to 1 SDU, that size is equal to the height of your target image, i.e. the Image's height will span the entire height of the target.
In case you set the height of the ImageDrawable to 0.5 SDU, it will span half the size of the Target.
Again, just to stress that point, a SDU is independent from any pixels (that in fact is one of the main reasons why we introduced SDUs).
over 5 years ago
Can anybody explain indetail abouth SDU? I've went through several times on the documentation. But i'm still confused with it. I have image drawables with different pixel sizes and I I'm with a trouble aligning them with the trackable image. Sometimes they are bigger than the target image and sometimes they are too small. Please help me with this and explain me how to 2D(pixel measured) images convert in to a image drawables.