Loading tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +20 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; /** * Delegate implementing the native methods of android.graphics.Paint Loading Loading @@ -91,6 +92,8 @@ public class Paint_Delegate { private MaskFilter_Delegate mMaskFilter; private Rasterizer_Delegate mRasterizer; private Locale mLocale = Locale.getDefault(); // ---- Public Helper methods ---- Loading Loading @@ -254,6 +257,8 @@ public class Paint_Delegate { return delegate.mFlags; } @LayoutlibDelegate /*package*/ static void setFlags(Paint thisPaint, int flags) { // get the delegate from the native int. Loading Loading @@ -903,6 +908,17 @@ public class Paint_Delegate { delegate.mTextAlign = align; } @LayoutlibDelegate /*package*/ static void native_setTextLocale(int native_object, String locale) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(native_object); if (delegate == null) { return; } delegate.setTextLocale(locale); } @LayoutlibDelegate /*package*/ static int native_getTextWidths(int native_object, char[] text, int index, int count, float[] widths) { Loading Loading @@ -1243,7 +1259,9 @@ public class Paint_Delegate { return 0; } private void setTextLocale(String locale) { mLocale = new Locale(locale); } private static void setFlag(Paint thisPaint, int flagMask, boolean flagValue) { // get the delegate from the native int. Loading @@ -1258,4 +1276,5 @@ public class Paint_Delegate { delegate.mFlags &= ~flagMask; } } } tools/layoutlib/create/.classpath +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ <classpathentry excluding="mock_android/" kind="src" path="tests"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/asm/asm-4.0.jar"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/asm-tools/asm-4.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Loading
tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +20 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; /** * Delegate implementing the native methods of android.graphics.Paint Loading Loading @@ -91,6 +92,8 @@ public class Paint_Delegate { private MaskFilter_Delegate mMaskFilter; private Rasterizer_Delegate mRasterizer; private Locale mLocale = Locale.getDefault(); // ---- Public Helper methods ---- Loading Loading @@ -254,6 +257,8 @@ public class Paint_Delegate { return delegate.mFlags; } @LayoutlibDelegate /*package*/ static void setFlags(Paint thisPaint, int flags) { // get the delegate from the native int. Loading Loading @@ -903,6 +908,17 @@ public class Paint_Delegate { delegate.mTextAlign = align; } @LayoutlibDelegate /*package*/ static void native_setTextLocale(int native_object, String locale) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(native_object); if (delegate == null) { return; } delegate.setTextLocale(locale); } @LayoutlibDelegate /*package*/ static int native_getTextWidths(int native_object, char[] text, int index, int count, float[] widths) { Loading Loading @@ -1243,7 +1259,9 @@ public class Paint_Delegate { return 0; } private void setTextLocale(String locale) { mLocale = new Locale(locale); } private static void setFlag(Paint thisPaint, int flagMask, boolean flagValue) { // get the delegate from the native int. Loading @@ -1258,4 +1276,5 @@ public class Paint_Delegate { delegate.mFlags &= ~flagMask; } } }
tools/layoutlib/create/.classpath +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ <classpathentry excluding="mock_android/" kind="src" path="tests"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/asm/asm-4.0.jar"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/asm-tools/asm-4.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath>