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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:11:55+00:00 2026-06-14T02:11:55+00:00

When i am selecteing the same value again which is in adapter the values

  • 0

When i am selecteing the same value again which is in adapter the values are not refreshed and even onItemSelectedListener or NothingSelected not fired

Here follows my code:

      spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
        public void onItemSelected(AdapterView<?> arg0, View arg1,
                int arg2, long arg3) {                  
                new MyBackgroundAsyncTask().execute();
        }
        public void onNothingSelected(AdapterView<?> arg0) {
                new MyBackgroundAsyncTask().execute();
        }
    });     
  • 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-14T02:11:56+00:00Added an answer on June 14, 2026 at 2:11 am
    public class NoDefaultSpinner extends android.widget.Spinner {
    
    private static Method s_pSelectionChangedMethod = null;
    
    private int key = 0;
    static { 
        try {               
            Class noparams[] = {};
            Class targetClass = AdapterView.class;
            s_pSelectionChangedMethod = targetClass.getDeclaredMethod("selectionChanged", noparams);            
    
            if (s_pSelectionChangedMethod != null) {
                s_pSelectionChangedMethod.setAccessible(true);              
            }
    
        } catch( Exception e ) {
            Log.e("Custom spinner, reflection bug:", e.getMessage());
            throw new RuntimeException(e);
        }
    }
    
    public NoDefaultSpinner(Context context) {      
        super(context);
    }
    
    public NoDefaultSpinner(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
    
    public NoDefaultSpinner(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
    
    @Override
    public void onClick(DialogInterface dialog, int which) {    
        super.onClick(dialog, which);   
         // Here my code goes.....
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I go on about selecting elements which has the same attribute values
We have a smelly code in our project. A lot of values which used
I would like to select the rows that has the same values across column
I'm trying to select all rows that contain the same value in one column
I am expanding the dropdown on focus which is same as clicking on the
when selecting a column that can contains a NULL value I get an exception
I'm having a dilemma. I have a field hashedX that is a hashed/salted value
I'm using the jQuery validate plugin, and would like to return a random value
I am trying to get the same result I obtain at http://jssha.sourceforge.net/ where I
I'm trying to set seletected value to a pre-loaded combobox using silverlight with MVVM.

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.