Fix bug 3334437 - require an adapter to measure dropdown content width
Change-Id: I357a2db66db121816091921e47708140958ad507
This commit is contained in:
@@ -672,6 +672,10 @@ public class Spinner extends AbsSpinner implements OnClickListener {
|
||||
@Override
|
||||
public int measureContentWidth() {
|
||||
final SpinnerAdapter adapter = getAdapter();
|
||||
if (adapter == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int width = 0;
|
||||
View itemView = null;
|
||||
int itemType = 0;
|
||||
|
||||
Reference in New Issue
Block a user