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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:10:26+00:00 2026-05-22T12:10:26+00:00

I read the documentation, but I don’t quite understand it… What is the parameter

  • 0

I read the documentation, but I don’t quite understand it… What is the parameter "animate" for?

Only thing I noticed:

public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
    if (savedPosition != -1)
    {
        ((Spinner) parent).setSelection(savedPosition );
        savedPosition  = -1;
        return;
    }
   //...
}

…works fine with setSelection, but runs into endless loop / StackOverflowError with setSelection(savedPosition, true);

I’m really curious why this would be so?

  • 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-22T12:10:26+00:00Added an answer on May 22, 2026 at 12:10 pm

    Well it should be doing what the name suggests. animating from the current position to the desired position. when you use just setSelection the change is more apropriate when you are trying to make sure the user sees the change (sort of a notification of a change) plus it looks smoother. at least that’s why i use it. as for the animating i never had any issues with it.

    why are you using the savedPosition instead of position for the selection? maybe that’s what is causing the loop. my suggestion is to try to do it with position and see if it fails. your code is somewhat odd..

    ye as the comment suggested you are calling the method again for some reason because i believe the animated setSelection does that when the selection is actually set.

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

Sidebar

Related Questions

I have read the documentation for the CI Caching but still don't understand much
I have read the documentation but don't fully understand how to do it. I
I have read the documentation at http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html , but don't understand when the around_*
I have read the documentation, but I still don't understand which classloader I should
I've read about hydration in doctrine's documentation but I still can't understand what it
I've read the documentation , but I'm still not sure I understand everything. Especially
I have read the documentation for this element but still fail to understand what
I know that I should understand Apple's documentation for NSTimer, but I don't! I
I have read the documentation ( http://dev.mysql.com/doc/refman/5.1/en/partitioning.html ), but I would like, in your
I read the Sun documentation and a lot of posts on Stack Overflow, but

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.