Go to the documentation of this file.00001 package com.introlab.rtabmap;
00002
00003 import android.content.Context;
00004 import android.util.AttributeSet;
00005 import android.widget.Spinner;
00006
00007
00012 public class NDSpinner extends Spinner {
00013
00014 public NDSpinner(Context context)
00015 { super(context); }
00016
00017 public NDSpinner(Context context, AttributeSet attrs)
00018 { super(context, attrs); }
00019
00020 public NDSpinner(Context context, AttributeSet attrs, int defStyle)
00021 { super(context, attrs, defStyle); }
00022
00023 @Override
00024 public void setSelection(int position, boolean animate) {
00025 boolean sameSelected = position == getSelectedItemPosition();
00026 super.setSelection(position, animate);
00027 if (sameSelected) {
00028
00029
00030 }
00031 }
00032
00033 @Override
00034 public void setSelection(int position) {
00035 boolean sameSelected = position == getSelectedItemPosition();
00036 super.setSelection(position);
00037 if (sameSelected) {
00038
00039 getOnItemSelectedListener().onItemSelected(this, getSelectedView(), position, getSelectedItemId());
00040 }
00041 }
00042
00043 }