Hi everyone,

In an app that I work on, I need to have view (an image most of the
time, but sometimes it's some text), which sometimes is in an expended
state and sometimes in a unexpended size, depends on some events. The
change of state is done with an animation.

For exemple in the middle of the screen, my image which is 70dip
height and fill screen in width in expended state, but when it's in
unexpended state it should be 20dip height and still fill screen in
width.
My view (image or text) should neither be deformed, nor be resized
visually. It should only show just the 20dip at the top of the view,
and the rest is not visible.

An optional functionality, is that in expended state the view should
be on top of the rest of content of the screen.


I have tried a lot of things like an imageview or textview in a
relativelayout which adjust its size depending on the state of the
view, but i failed to get it work.

So now I think the best way is to create my own custom layout which
will keep the size of its children to not deform them, it will also
calcul its size depending on the state (expended/unexpended).
To achieve this, I've read some presentation like "Dive into Android"
from Chet Haase and Romain Guy, and android docs (http://
developer.android.com/guide/topics/ui/custom-components.html).
But I still have some problems with the calculation of size by the
custom layout, if anyone know a good tutorial about this or have
another idea about how to do this ?


Thanks for reading and your possible help

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