Thursday, September 27, 2012

[android-developers] Re: Aligning a view to an ImageView in different resolutions

adam

On Sep 27, 10:50 am, Serdel <adam.lichwierow...@gmail.com> wrote:
> Hi Kostya,
>
> I am not sure what is complicated here... I just want to place my progress
> bar in the exact location on my imageview.

did you try to use ImageView's Matrix? i type it from my memory so it
can have some errors but the idea is as follows:

ImageView iv = (ImageView) findViewById(R.id.iv)
Matrix m = iv.getImageMatrix()
Log.d(TAG, "matrix" + m)
float[] points = {
31, 9, // we want to map pixel [31, 9]
}
m.mapPoints(points)
Log.d(TAG, "pixel mapped to view @ " + points[0] + " x " + points[1])

pskink

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate