You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public HorizontalSpinner(Context context) {
super(context);
}
public HorizontalSpinner(Context context, AttributeSet attrs) {
super(context, attrs);
}
public HorizontalSpinner(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void setSelection(int position, boolean animate) {
boolean sameSelected = position == getSelectedItemPosition();
super.setSelection(position, animate);
if (sameSelected) {
// Spinner does not call the OnItemSelectedListener if the same item is selected, so do it manually now
getOnItemSelectedListener().onItemSelected(this, getSelectedView(), position, getSelectedItemId());
}
}
@Override
public void setSelection(int position) {
boolean sameSelected = position == getSelectedItemPosition();
super.setSelection(position);
if (sameSelected) {
// Spinner does not call the OnItemSelectedListener if the same item is selected, so do it manually now
getOnItemSelectedListener().onItemSelected(this, getSelectedView(), position, getSelectedItemId());
}
}
В HorizontalSpinner.java додайте
private void refreshChildItem(int index) {
....
if (index != mCurrentIndex) {
view.setOnClickListener(mOnClickListener);
} else {
view.setOnClickListener(mOnSwitchListener);
}
.....
}
The text was updated successfully, but these errors were encountered: