Just in case anybody else wants to accomplish this, all you have to do
is override your child view's getHitRect method to account for your
parent view's scale transformation.

I'm not sure why the base view class doesn't do this automatically,
but I'm sure there is a reason.

On May 12, 2:03 pm, Jonathan <[email protected]> wrote:
> Right, thats what I am trying to figure out how to do. I currently
> don't know how to separate a hit area from an actual view.
>
> It would make sense to me if there was some function needed to be
> called that would then figure out the new bounds of the views and
> change their hit areas appropriately. I am calling invalidate on the
> parent layout, but that doesn't seem to do anything to the views
> themselves. I'll try calling it on each child and see if that makes a
> difference.
>
> On May 12, 8:54 am, Jason Tomlinson <[email protected]> wrote:
>
>
>
>
>
> > You need to scale your hit areas to match the canvas scaling.  If you
> > zoom in 2x on the canvas your hit area is now twice the size likewise
> > if you zoomed out 2x then your hit area is half the size.
>
> > On May 11, 2:52 pm, Jonathan <[email protected]> wrote:
>
> > > I am scaling the canvas of a linear layout on draw, but this throws
> > > off all the hit areas of my views inside of this layout. They respond
> > > as if there was no scaling taking place. What do I have to do to get
> > > themselves to re-register their hit areas?
>
> > > Thanks
>
> > > Jonathan
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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

Reply via email to