Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4348fcdd authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 8d06cc6d: Merge "Permit null adapters in Spinners" into jb-mr2-dev

* commit '8d06cc6d':
  Permit null adapters in Spinners
parents ee067769 8d06cc6d
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -494,6 +494,8 @@ public class Spinner extends AbsSpinner implements OnClickListener {

        // Make selected view and position it
        mFirstPosition = mSelectedPosition;

        if (mAdapter != null) {
            View sel = makeAndAddView(mSelectedPosition);
            int width = sel.getMeasuredWidth();
            int selectedOffset = childrenLeft;
@@ -508,6 +510,7 @@ public class Spinner extends AbsSpinner implements OnClickListener {
                    break;
            }
            sel.offsetLeftAndRight(selectedOffset);
        }

        // Flush any cached views that did not get reused above
        mRecycler.clear();