Thanks for the input, I am very new at this UI thing so it makes sense
that there are some mistakes there, however, I have tried basing my
directions on trial and error and answers I got in this group, for
example, the use of framelayout was recommended in this group and
that's why I tried it, but the result (as is visible in the post) was
bad. I switched to using LinearLayout when I have failed to get the
FrameLayout to do what I wanted. If required by anyone, I can post the
code I tried for that and did not work, and will be happy to hear some
other suggestions because I did try your way on the FrameLayout and it
did not work.

Regarding the requestLayout call, that is another answer I got in this
group (from you I believe) and invalidate (or actually postInvalidate)
was what I had used before, but after switching to LinearLayout from
AbsoluteLayout and changing the upwards movement of the imageview from
absolute coordinate change to bottom margin change, that was not
sufficient - again, since there is not allot of info out there, I
can't say why this is (and I have posted a question about it here but
I know that there is a huge volume of questions and not all of them
can be answered) but the fact remains that without calling it - it
will only show the update on one of the imageviews.
I have a question about request layout - what I have done in an effort
to optimize it is that I called it on the imageViews' container only
so it will redraw only it and it's children - is that still considered
wasteful?

I really do appreciate the help and the corrections since I do want
the project to succeed, please respond to this post so I can indeed
fix it and let others learn from my mistakes, because right now, there
really isn't enough info on developing for android on the web, and
even less on UI issues so I think that if my blog can help there, let
it at least hold the most accurate information available.

Thanks,
Sh.

On May 5, 6:45 pm, Romain Guy <[email protected]> wrote:
> 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 <[email protected]> wrote:
>
> > check out my simple example athttp://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 <[email protected]> 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
> [email protected]
>
> 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 [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