Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6089877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:08:58+00:00 2026-05-23T12:08:58+00:00

i have built a custom viewgroup and m beginning to implement animations tot his

  • 0

i have built a custom viewgroup and m beginning to implement animations tot his viewgroup. the problem i am having is that i need the viewgroup to be able to animate without it’s children being animated by the same animation.

Lets say i am scaling the viewgroup to 2x size, but i still want to keep children at the same size (thus fitting more children into the viewgroup).

Right now i am calling the animation as follows:

    ScaleAnimation expandAnimation =  new ScaleAnimation(1,2,1,2);
    this.startAnimation(expandAnimation);

Thanks in advance! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:08:58+00:00Added an answer on May 23, 2026 at 12:08 pm

    You can’t directly do what you’re seeking to do with the old Android animation API. You’ve already noticed one limitation – that scaling the group also includes the children.

    The second limitation is that the old Android animation API only affects the visual render of the item you’re animating, and only for the time the animation is active. In other words, it doesn’t actually alter the size or positioning of the item in question in terms of view layout. It only temporarily renders it a different way. So for instance, to animate a button moving from x to y across the screen, you would need to run the animation, then when the animation completes actually reposition the button using the layout APIs.

    Probably the way to do what you’re looking for is:

    1. Incorporate an extra ViewGroup
      widget in your layout, positioned
      and sized over top the widget
      containing the “real” items.
      Initially, it’s invisible.
    2. Make
      it visible, and play the animation.
    3. When animation complete, hide the
      extra widget, then resize your real
      ViewGroup widget via LayoutParams
      and add your extra items.
    4. You’ll
      probably need to tweak this general
      outline to make the effect look
      smooth. (For instance, resize the real viewgroup in the background before you remove the fake viewgroup from the screen).

    Android introduced a newer, more flexible animation API in 3.0 Honeycomb, but unfortunately it’s not available if you’re targeting 2.x devices (i.e., phones). Hopefully this will be easier once the new APIs are mainstream.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just built a custom autocomplete component using jquery. My problem is that
I have built a custom membership provider that I have used in a previous
We have a custom-built Flash-based video player that I maintain, and it needs to
I have an ASP control custom built and I need to pass a value
I have a custom application that was built to send opt-in newsletters and marketing
I have a mac with a custom PHP 5 install that built from about
I have built a few custom applications that run on WSS 3 using the
We have a custom built program that needs authenticated/encrypted communication between a client and
I have a custom-built MVC PHP framework that I am in the process of
I have built a Custom Control Class that makes it much easier to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.