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:36 PM, Sheepz <eladk...@gmail.com> wrote:
>
> I have encountered this issue, and wrote a blog post about it, have a
> look if you're still stuck:
> http://developreality.blogspot.com/
> Enjoy!
>
> On Apr 29, 6:01 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>> karthikr wrote:
>> > I have just realised that AbsoluteLayout has been deprecated in the
>> > latest sdk, however I have designed my apps based on AbsoluteLayout
>> > and it is very difficult for me to remove them and change it to a
>> > different layout. Can someone help me as to how I should proceed?
>>
>> AFAIK, you have your choice of:
>>
>> -- Change to another layout
>>
>> -- Copy the AbsoluteLayout code (and its dependencies) from the source
>> tree into your project and maintain your own local copy
>>
>> -- Start an independent open source project to keep AbsoluteLayout alive
>> (same as previous option, just perhaps with other people helping you)
>>
>> All of these involve some amount of work.
>>
>> > Absolute layout was really helpful in positioning the elements to be
>> > accurate.
>>
>> That depends on your definition of "accurate".
>>
>> > One could always had different layout definitions for
>> > different screen sizes, and based on the current width and height the
>> > required layout can be set.
>>
>> You are assuming you will know all of the possible screen sizes. If
>> Android is a success, you will have no way of knowing, when you write
>> your software, what screen size will be used, since there will be too
>> many to keep track of.
>>
>> --
>> Mark Murphy (a Commons 
>> Guy)http://commonsware.com|http://twitter.com/commonsguy
>>
>> Android App Developer Books:http://commonsware.com/books.html
> >
>



-- 
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