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

Commit 96694ee2 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

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

* commit '4348fcdd':
  Permit null adapters in Spinners
parents 9ee5c5f1 4348fcdd
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();