Your blog post is full of misunderstandings. First of all, using
margins *does* work for what you want with a FrameLayout. You used a
LinearLayout and as a result your views are much bigger than they need
to be and it's probably much more expensive that it needs to be.
Second of all, you should NOT call requestLayout() from your draw()
method. requestLayout() is a very expensive call that causes all your
views to be re-measured and re-laid out. It has nothing to do with the
requesting a redraw, that's what invalidate() is for.

On Tue, May 5, 2009 at 3:38 PM, Sheepz <eladk...@gmail.com> wrote:
>
> check out my simple example at http://developreality.blogspot.com/
> it's my blog, and i have a post on doing just that...
> good luck
>
> On May 4, 5:34 am, 6real <xirgon...@gmail.com> wrote:
>> Hello,
>>
>> could someone give a simple example to replace an AbsoluteLayout with
>> Frame and Relative Layout ?
>>
>> Example :
>> I have to put a view on my screen with the position x, y and with a
>> width/height of w and h... How do I do that without AbsoluteLayout ?
>>
>> Actually I will change it on my app but I am wondering the best way of
>> doing... It seems now we have to handle with margins instead of x and
>> y ?
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to