OeffiMapView: Fix parameter order when invoking MeasureSpec.makeMeasureSpec().

This commit is contained in:
Andreas Schildbach 2019-10-26 20:58:48 +02:00
parent 0514ca2cc1
commit b028cbba38

View file

@ -236,8 +236,8 @@ public class OeffiMapView extends MapView {
final LineView lineView = (LineView) inflater.inflate(R.layout.map_trip_line, null); final LineView lineView = (LineView) inflater.inflate(R.layout.map_trip_line, null);
lineView.setLine(publicLeg.line); lineView.setLine(publicLeg.line);
lineView.measure(MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0), lineView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0)); MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
final int width = lineView.getMeasuredWidth(); final int width = lineView.getMeasuredWidth();
final int height = lineView.getMeasuredHeight(); final int height = lineView.getMeasuredHeight();
lineView.layout(point.x - width / 2, point.y - height / 2, point.x + width / 2, lineView.layout(point.x - width / 2, point.y - height / 2, point.x + width / 2,
@ -361,8 +361,8 @@ public class OeffiMapView extends MapView {
bubble.setTypeface(Typeface.DEFAULT_BOLD); bubble.setTypeface(Typeface.DEFAULT_BOLD);
bubble.setTextSize(TypedValue.COMPLEX_UNIT_PX, stationFontSize); bubble.setTextSize(TypedValue.COMPLEX_UNIT_PX, stationFontSize);
bubble.setIncludeFontPadding(false); bubble.setIncludeFontPadding(false);
bubble.measure(MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0), bubble.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0)); MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
final int width = bubble.getMeasuredWidth(); final int width = bubble.getMeasuredWidth();
final int height = bubble.getMeasuredHeight(); final int height = bubble.getMeasuredHeight();
bubble.layout(point.x - width / 2, point.y - height / 2, point.x + width / 2, bubble.layout(point.x - width / 2, point.y - height / 2, point.x + width / 2,