I am looking at how to implement nice animations in a ListView for an app targeting Android 3 and more. Specifically, I would like to implement the same behavior that can be seen in the Gmail app when an item is deleted or archived: the other elements of the list smoothly move to fill the empty space left.
The Gmail app may not be using a ListView, or may be using a
customized derivative of ListView to achieve that effect. I imagine
it's not as simple as setting a flag or writing a few lines of code to
run an animation.
Doug
On Nov 4, 6:06 am, BoD <bodlu...@gmail.com> wrote:
> I am looking at how to implement nice animations in a ListView for an
> app targeting Android 3 and more.
> Specifically, I would like to implement the same behavior that can be
> seen in the Gmail app when an item is deleted or archived: the other
> elements of the list smoothly move to fill the empty space left.
> The Gmail app may not be using a ListView, or may be using a > customized derivative of ListView to achieve that effect. I imagine > it's not as simple as setting a flag or writing a few lines of code to > run an animation.
> Doug
> On Nov 4, 6:06 am, BoD <bodlu...@gmail.com> wrote: > > Hi!
> > I am looking at how to implement nice animations in a ListView for an > > app targeting Android 3 and more. > > Specifically, I would like to implement the same behavior that can be > > seen in the Gmail app when an item is deleted or archived: the other > > elements of the list smoothly move to fill the empty space left.
> > Any pointers on this? > > Thanks a lot!
> > -- > > BoD
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
On Sun, Nov 6, 2011 at 10:33 AM, Romain Guy <romain...@android.com> wrote: > Gmail uses a custom ListView. > On Nov 5, 2011 7:20 PM, "Doug" <beafd...@gmail.com> wrote:
>> The Gmail app may not be using a ListView, or may be using a >> customized derivative of ListView to achieve that effect. I imagine >> it's not as simple as setting a flag or writing a few lines of code to >> run an animation.
>> Doug
>> On Nov 4, 6:06 am, BoD <bodlu...@gmail.com> wrote: >> > Hi!
>> > I am looking at how to implement nice animations in a ListView for an >> > app targeting Android 3 and more. >> > Specifically, I would like to implement the same behavior that can be >> > seen in the Gmail app when an item is deleted or archived: the other >> > elements of the list smoothly move to fill the empty space left.
>> > Any pointers on this? >> > Thanks a lot!
>> > -- >> > BoD
>> -- >> 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+unsubscribe@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> You can get the Item position of the selected text view, Once this is > deleted you can iterate > and assign the new Items at that location.
> Lokesh
> On Sun, Nov 6, 2011 at 10:33 AM, Romain Guy <romain...@android.com > <mailto:romain...@android.com>> wrote:
> Gmail uses a custom ListView.
> On Nov 5, 2011 7:20 PM, "Doug" <beafd...@gmail.com > <mailto:beafd...@gmail.com>> wrote:
> The Gmail app may not be using a ListView, or may be using a > customized derivative of ListView to achieve that effect. I > imagine > it's not as simple as setting a flag or writing a few lines of > code to > run an animation.
> Doug
> On Nov 4, 6:06 am, BoD <bodlu...@gmail.com > <mailto:bodlu...@gmail.com>> wrote: > > Hi!
> > I am looking at how to implement nice animations in a > ListView for an > > app targeting Android 3 and more. > > Specifically, I would like to implement the same behavior > that can be > > seen in the Gmail app when an item is deleted or archived: > the other > > elements of the list smoothly move to fill the empty space left.
> > Any pointers on this? > > Thanks a lot!
> > -- > > BoD
> -- > 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 > <mailto:android-developers@googlegroups.com> > To unsubscribe from this group, send email to > android-developers+unsubscribe@googlegroups.com > <mailto:android-developers%2Bunsubscribe@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> -- > 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 > <mailto:android-developers@googlegroups.com> > To unsubscribe from this group, send email to > android-developers+unsubscribe@googlegroups.com > <mailto:android-developers%2Bunsubscribe@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> -- > Thanks & Regards > Lokesh Gupta > -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
Kostya: I tried animating the item directly and it didn't work as I wished, but I admit I didn't go too far to see why. I'll look more into it as soon as I have a bit of time.
Thank you everybody for your replies. I'll post a follow-up here if I manage to do anything good looking ;)