Good morning,
Found a little bug in Spinner widget when using a ImageView (or widget
that doesn't have a baseline) as view for Spinner.
Spinner source code:
@Override
public int getBaseline() {
View child = null;
if (getChildCount() > 0) {
child = getChildAt(0);
} else if (mAdapter != null && mAdapter.getCount() > 0) {
child = makeAndAddView(0);
// TODO: We should probably put the child in the recycler
}
if (child != null) {
return child.getTop() + child.getBaseline();
} else {
return -1;
}
}
ImageView doesn't have valid baseline, so when Spinner shows on device
the Spinner widget is drawn to low.
Overriding getBaseLine() in ImageView and returning 15 seem to
positioning the Spinner widget correctly.
Does anybody know how i can calculate the value that should be
returned by getBaseLine()?
Kind regards,
Twan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---