We may face an issue on Spinner lies on long vertical scroll, (i.e.) when selected and item from dropdown the focus moves to top of scroll.
To avoid this please follow this piece of code
To avoid this please follow this piece of code
spinner.setFocusableInTouchMode(true);
spinner.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
if (spinner.getWindowToken() != null) {
spinner.performClick();
}
}
}
});
_______________________________________________________________________________
Happy Coding...
Comments
Post a Comment