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 8524913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:49:20+00:00 2026-06-11T07:49:20+00:00

I have a button (button1) and relative layout (rLayout). At start, rLayout is not

  • 0

I have a button (button1) and relative layout (rLayout). At start, rLayout is not visible to user. When the button is clicked, I want:

  1. if rLayout is invisible, it should slide in from the bottom of the screen,
  2. If rLayout is visible, it should slide back until it completely disappears below the bottom of the screen.

It should be something like SlidingDrawer but not the same thing.

I can do it with TranslateAnimation, AnimationListener and OnClickListener, BUT:
my API version is 11 and I read that there are better ways to handle animation since api11. I tried to find examples of what I need, but failed to do so. So my question is: are animation techniques introduced in API 11 better that old ones and how to do what I need with those techniques?

  • 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-06-11T07:49:21+00:00Added an answer on June 11, 2026 at 7:49 am

    are animation techniques introduced in API 11 better that old ones

    My impression is that Google will be focusing on optimizing the new animator APIs (e.g., ViewPropertyAnimator) perhaps more than the legacy animation APIs (e.g., TranslateAnimation).

    how to do what I need with those techniques?

    Use ViewPropertyAnimator, with methods like translateYBy(). You get a ViewPropertyAnimator by calling animate() on a View, on API Level 11+. If you are supporting older devices, NineOldAndroids offers a near-workalike backport. Here is another SO question and answer that gets into the use of these APIs for sliding fragments around: https://stackoverflow.com/a/12318422/115145

    You might also wish to read:

    • http://android-developers.blogspot.com/2011/05/introducing-viewpropertyanimator.html
    • http://developer.android.com/guide/topics/graphics/prop-animation.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to add a custom layout in a relative layout on a button
I have this layout Linear Layout Scroll View Relative Layout 9x Button In View
I have a button, id = button1 , when clicked it runs the function
Typical search layout having RelativeLayout, TextView, EditText and Button I have a.9.png image having
I have an unordered list. <style> #button1 { position:relative; z-index: 3; } #button2 {
I have a button,Linkbutton and an ModalPopup. If I click button1 I need to
I have button that a user selects and I pop up a AlertDialog to
I have a simple screen with a start button. When the Start button is
Ok I have a relative layout inside a linear one.Until now,the relative layout was
I have used relative layout and scrollview in my xml file. When i click

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.