NDSpinner.java
Go to the documentation of this file.
1 package com.introlab.rtabmap;
2 
3 import android.content.Context;
4 import android.util.AttributeSet;
5 import android.widget.Spinner;
6 
7 
12 public class NDSpinner extends Spinner {
13 
14  public NDSpinner(Context context)
15  { super(context); }
16 
17  public NDSpinner(Context context, AttributeSet attrs)
18  { super(context, attrs); }
19 
20  public NDSpinner(Context context, AttributeSet attrs, int defStyle)
21  { super(context, attrs, defStyle); }
22 
23  @Override
24  public void setSelection(int position, boolean animate) {
25  boolean sameSelected = position == getSelectedItemPosition();
26  super.setSelection(position, animate);
27  if (sameSelected) {
28  // Spinner does not call the OnItemSelectedListener if the same item is selected, so do it manually now
29  //getOnItemSelectedListener().onItemSelected(this, getSelectedView(), position, getSelectedItemId());
30  }
31  }
32 
33  @Override
34  public void setSelection(int position) {
35  boolean sameSelected = position == getSelectedItemPosition();
36  super.setSelection(position);
37  if (sameSelected) {
38  // Spinner does not call the OnItemSelectedListener if the same item is selected, so do it manually now
39  getOnItemSelectedListener().onItemSelected(this, getSelectedView(), position, getSelectedItemId());
40  }
41  }
42 
43 }
com.introlab.rtabmap.NDSpinner.setSelection
void setSelection(int position, boolean animate)
Definition: NDSpinner.java:24
com.introlab.rtabmap.NDSpinner.setSelection
void setSelection(int position)
Definition: NDSpinner.java:34
com.introlab.rtabmap.NDSpinner.NDSpinner
NDSpinner(Context context, AttributeSet attrs, int defStyle)
Definition: NDSpinner.java:20
com.introlab.rtabmap.NDSpinner.NDSpinner
NDSpinner(Context context, AttributeSet attrs)
Definition: NDSpinner.java:17
position
Point3 position(const NavState &X, OptionalJacobian< 3, 9 > H)
com.introlab.rtabmap.NDSpinner
Definition: NDSpinner.java:12
com.introlab.rtabmap.NDSpinner.NDSpinner
NDSpinner(Context context)
Definition: NDSpinner.java:14


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:13