Loading tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +6 −7 Original line number Diff line number Diff line Loading @@ -886,23 +886,22 @@ public class Canvas_Delegate { native_drawText(nativeCanvas, buffer, 0, count, x, y, flags, paint); } /*package*/ static void native_drawTextRun(int nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, int flags, int paint) { // FIXME throw new UnsupportedOperationException(); } int count = end - start; char[] buffer = TemporaryBuffer.obtain(count); TextUtils.getChars(text, start, end, buffer, 0); native_drawText(nativeCanvas, buffer, start, end, x, y, flags, paint); } /*package*/ static void native_drawTextRun(int nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, int flags, int paint) { // FIXME throw new UnsupportedOperationException(); native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint); } /*package*/ static void native_drawPosText(int nativeCanvas, char[] text, int index, int count, float[] pos, Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +3 −4 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ public final class Bridge implements ILayoutBridge { MeasureSpec.UNSPECIFIED); // this lets us know the actual needed size h_spec = MeasureSpec.makeMeasureSpec(screenHeight - screenOffset, MeasureSpec.UNSPECIFIED); // this lets us know the actual needed size view.measure(w_spec, h_spec); root.measure(w_spec, h_spec); int neededWidth = root.getChildAt(0).getMeasuredWidth(); if (neededWidth > screenWidth) { Loading @@ -448,10 +448,10 @@ public final class Bridge implements ILayoutBridge { w_spec = MeasureSpec.makeMeasureSpec(screenWidth, MeasureSpec.EXACTLY); h_spec = MeasureSpec.makeMeasureSpec(screenHeight - screenOffset, MeasureSpec.EXACTLY); view.measure(w_spec, h_spec); root.measure(w_spec, h_spec); // now do the layout. view.layout(0, screenOffset, screenWidth, screenHeight); root.layout(0, screenOffset, screenWidth, screenHeight); // draw the views // create the BufferedImage into which the layout will be rendered. Loading @@ -468,7 +468,6 @@ public final class Bridge implements ILayoutBridge { Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(canvas); canvasDelegate.setLogger(logger); root.draw(canvas); canvasDelegate.dispose(); Loading Loading
tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +6 −7 Original line number Diff line number Diff line Loading @@ -886,23 +886,22 @@ public class Canvas_Delegate { native_drawText(nativeCanvas, buffer, 0, count, x, y, flags, paint); } /*package*/ static void native_drawTextRun(int nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, int flags, int paint) { // FIXME throw new UnsupportedOperationException(); } int count = end - start; char[] buffer = TemporaryBuffer.obtain(count); TextUtils.getChars(text, start, end, buffer, 0); native_drawText(nativeCanvas, buffer, start, end, x, y, flags, paint); } /*package*/ static void native_drawTextRun(int nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, int flags, int paint) { // FIXME throw new UnsupportedOperationException(); native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint); } /*package*/ static void native_drawPosText(int nativeCanvas, char[] text, int index, int count, float[] pos, Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +3 −4 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ public final class Bridge implements ILayoutBridge { MeasureSpec.UNSPECIFIED); // this lets us know the actual needed size h_spec = MeasureSpec.makeMeasureSpec(screenHeight - screenOffset, MeasureSpec.UNSPECIFIED); // this lets us know the actual needed size view.measure(w_spec, h_spec); root.measure(w_spec, h_spec); int neededWidth = root.getChildAt(0).getMeasuredWidth(); if (neededWidth > screenWidth) { Loading @@ -448,10 +448,10 @@ public final class Bridge implements ILayoutBridge { w_spec = MeasureSpec.makeMeasureSpec(screenWidth, MeasureSpec.EXACTLY); h_spec = MeasureSpec.makeMeasureSpec(screenHeight - screenOffset, MeasureSpec.EXACTLY); view.measure(w_spec, h_spec); root.measure(w_spec, h_spec); // now do the layout. view.layout(0, screenOffset, screenWidth, screenHeight); root.layout(0, screenOffset, screenWidth, screenHeight); // draw the views // create the BufferedImage into which the layout will be rendered. Loading @@ -468,7 +468,6 @@ public final class Bridge implements ILayoutBridge { Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(canvas); canvasDelegate.setLogger(logger); root.draw(canvas); canvasDelegate.dispose(); Loading