On Mon, Dec 12, 2011 at 12:53 PM, Julian <[email protected]> wrote: > I think using the following technique, however, there is no better > layout to use than AbsoluteLayout.
The typically given solution for replacing AbsoluteLayout is to create your own custom layout manager. > My tags' coordinates are defined > in percentages rather than pixels. At runtime, I get the width and > height of the image I'm overlaying, and calculate the pixel > coordinates of the tags. The tags are then added to the > AbsoluteLayout using the calculated coordinates. If the image expands > or shrinks on different sized screens, it won't matter because the > coordinates of the tags will scale along with it. This definitely sounds like you should create your own custom layout manager. > To avoid getting the rug pulled out from under me if AbsoluteLayout is > ever all of a sudden removed from the SDK, I ended up using a > FrameLayout and setting top and left margins (the exact same effect) > to position the tags. You are welcome to do what you want, but it would be more elegant to create your own custom layout manager. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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

