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

  • SEARCH
  • Home
  • 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 8162347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:41:10+00:00 2026-06-06T18:41:10+00:00

i have four imageviews in a linear layout in such a manner that only

  • 0

i have four imageviews in a linear layout in such a manner that only three are shown at a time.

<set xmlns:android="http://schemas.android.com/apk/res/android" 
    android:interpolator="@android:anim/decelerate_interpolator">

 <translate 
    android:fromXDelta="0%" 
    android:toXDelta="-33%" 
    android:duration="500"
    android:fillAfter="true" />

</set>

i m using this animation to move them from right to left. i have applied this animation to all the images in onFling method. but the problem is that they move to left side but immediately come back to its original position.
i want them to stay on their new positions.
and on swiping first time the first image should move out of the screen and fourth image should move in from right side of screen.
can anyone tell me how can i do this.
thanks

  • 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-06T18:41:11+00:00Added an answer on June 6, 2026 at 6:41 pm

    Here you go

    <?xml version="1.0" encoding="utf-8"?>
    <set xmlns:android="http://schemas.android.com/apk/res/android"
        android:fillAfter="true"
        android:interpolator="@android:anim/decelerate_interpolator" >
    
        <translate
            android:duration="500"
            android:fromXDelta="0%"
            android:interpolator="@android:anim/decelerate_interpolator"
            android:toXDelta="-33%" />
    
    </set>
    

    You need to add fillAfter=true attributes to set.

    And most important thing why you embedding translate animation inside set?

    Set is used when you want mixture of multiple kind of animations.

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

Sidebar

Related Questions

I have a main activity with this layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I thought I have understood the XML layout of Android, but it seems that
I have four tabs that hold four listviews, I want to set a background
I have four imageviews which are set to invisible at activity start (or rather
i have four radio buttons , and i want to set a text for
i have four tables user-question contains two columns: questionID, userID, the questions that the
I have four tables. Three of them are tables with one key and they
I have set the size of the tableView that I show as the popoverController
I have four textfields that bind to the model key path. If a number
I am a newbie and I have been working on an android layout for

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.