[android-developers] Re: Help with animation

2010-12-26 Thread Zsolt Vasvari
Thanks, will give it a try.

On Dec 27, 8:01 am, Doug  wrote:
> On Dec 25, 1:51 am, Zsolt Vasvari  wrote:
>
> > Thanks,  Doug.    I am basically trying to achieve the same effect
> > that happens when you tap the More button on the new Market app when
> > you want to see more of an apmp's description.   Everything below the
> > description slides down smoothly revealing the full text.
>
> My guess is that whole market screen is one big vertical ScrollView,
> with a vertical LinearLayout and when you click the More button,
> something is adjusting the description view's height so that
> everything is necessarily pushed below in order to maintain the
> layout.  I can't think of an SDK component that gets you this
> functionality for free, though.  It might just be a matter of DIY:
> post a series of messages to a handler that increase the layout height
> of a view over time (or something along those lines).
>
> Doug

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


[android-developers] Re: Help with animation

2010-12-26 Thread Doug
On Dec 25, 1:51 am, Zsolt Vasvari  wrote:
> Thanks,  Doug.    I am basically trying to achieve the same effect
> that happens when you tap the More button on the new Market app when
> you want to see more of an apmp's description.   Everything below the
> description slides down smoothly revealing the full text.

My guess is that whole market screen is one big vertical ScrollView,
with a vertical LinearLayout and when you click the More button,
something is adjusting the description view's height so that
everything is necessarily pushed below in order to maintain the
layout.  I can't think of an SDK component that gets you this
functionality for free, though.  It might just be a matter of DIY:
post a series of messages to a handler that increase the layout height
of a view over time (or something along those lines).

Doug

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


[android-developers] Re: Help with animation

2010-12-25 Thread Zsolt Vasvari
Thanks, I've read thorugh those articles a few days ago and there is
nothing related to this.  Very good reading, BTW.

On Dec 26, 7:47 am, TreKing  wrote:
> On Sat, Dec 25, 2010 at 3:51 AM, Zsolt Vasvari  wrote:
> > I am basically trying to achieve the same effect that happens when you tap
> > the More button on the new Market app when you want to see more of an apmp's
> > description.
>
> Then try reading through 
> this:http://www.pushing-pixels.org/2010/12/13/meet-the-green-goblin-part-1...
>
> I
> didn't read through it myself, but seems to go into detail on the new Market
> design and implementation. Perhaps the "More" functionality is explained.
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Help with animation

2010-12-25 Thread TreKing
On Sat, Dec 25, 2010 at 3:51 AM, Zsolt Vasvari  wrote:

> I am basically trying to achieve the same effect that happens when you tap
> the More button on the new Market app when you want to see more of an apmp's
> description.
>

Then try reading through this:
http://www.pushing-pixels.org/2010/12/13/meet-the-green-goblin-part-1.html

I
didn't read through it myself, but seems to go into detail on the new Market
design and implementation. Perhaps the "More" functionality is explained.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Help with animation

2010-12-25 Thread Zsolt Vasvari

Thanks,  Doug.I am basically trying to achieve the same effect
that happens when you tap the More button on the new Market app when
you want to see more of an apmp's description.   Everything below the
description slides down smoothly revealing the full text.


On Dec 25, 11:52 am, Doug  wrote:
> I think View1 is always going to have an intrinsic height of its
> measured height for the layout.  That is to say, an animation isn't
> going to change a view's measured height over time, it will just
> change the way it appears on screen over the duration of the
> animation.  The mere presence of View1 in your layout will cause the
> layout to set aside its measured dimensions.
>
> I could be wrong, but I don't think an animation with a layout like
> this is going to achieve the effect you're looking for.  You may have
> to do something where you change the measured height of the view over
> time and invalidate the view/layout at every tick to get it to re-
> render everything.
>
> Doug
>
> On Dec 24, 6:18 pm, Zsolt Vasvari  wrote:
>
>
>
> > I have a LinearLayout with 2 vertical components:
>
> > View1
> > View2
>
> > I would like to smoothly animate-in View1.
>
> > I am using the following animation:
>
> >  > android:fromYScale="0.0" android:toYScale="1.0"
> >            android:pivotX="0" android:pivotY="0"
> > android:duration="@android:integer/config_longAnimTime"/>
>
> > I am doing a:
>
> > view1.startAnimation(animation);
> > view1.setVisibility(View.VISIBLE);
>
> > It works, but the problem is that View2 snaps down and View1 fills the
> > gap.   How do I make it so View2 slide down smoothly?  I've tried
> > postponing the setVisibilty() call to after the animation had
> > finished, but then View1 slides down over View2 which looks even
> > worse.
>
> > Thanks.

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


[android-developers] Re: Help with animation

2010-12-24 Thread Doug
I think View1 is always going to have an intrinsic height of its
measured height for the layout.  That is to say, an animation isn't
going to change a view's measured height over time, it will just
change the way it appears on screen over the duration of the
animation.  The mere presence of View1 in your layout will cause the
layout to set aside its measured dimensions.

I could be wrong, but I don't think an animation with a layout like
this is going to achieve the effect you're looking for.  You may have
to do something where you change the measured height of the view over
time and invalidate the view/layout at every tick to get it to re-
render everything.

Doug

On Dec 24, 6:18 pm, Zsolt Vasvari  wrote:
> I have a LinearLayout with 2 vertical components:
>
> View1
> View2
>
> I would like to smoothly animate-in View1.
>
> I am using the following animation:
>
>  android:fromYScale="0.0" android:toYScale="1.0"
>            android:pivotX="0" android:pivotY="0"
> android:duration="@android:integer/config_longAnimTime"/>
>
> I am doing a:
>
> view1.startAnimation(animation);
> view1.setVisibility(View.VISIBLE);
>
> It works, but the problem is that View2 snaps down and View1 fills the
> gap.   How do I make it so View2 slide down smoothly?  I've tried
> postponing the setVisibilty() call to after the animation had
> finished, but then View1 slides down over View2 which looks even
> worse.
>
> Thanks.

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


Re: [android-developers] Re: Help with animation

2010-12-24 Thread TreKing
On Fri, Dec 24, 2010 at 9:45 PM, Zsolt Vasvari  wrote:

> Really? That's the only way?  Not very object oriented ...
>

No idea if it's the only or even best option, honestly. Haven't done any
animations, but AFAIK they don't actually modify the views, just how they're
rendered. So if you have another view depenedent on the animation of the
first, I think you'd have to animate it as well.

I can have any number of views under View2, they would all need to
> be translated.  Seems very heavy handed.


I would expect an animation applied to a ViewGroup to also apply to it's
children as well - but again, I don't know much on the topic. Just throwing
out an idea.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Help with animation

2010-12-24 Thread Zsolt Vasvari
Really? That's the only way?  Not very object oriented ... I can have
any number of views under View2, they would all need to be
translated.  Seems very heavy handed.

On Dec 25, 11:16 am, TreKing  wrote:
> On Fri, Dec 24, 2010 at 8:18 PM, Zsolt Vasvari  wrote:
> > How do I make it so View2 slide down smoothly?
>
> Animate it as well, with a Translation animation, perhaps?
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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