Package org.robolectric.shadows
Class ShadowFontBuilder
java.lang.Object
org.robolectric.shadows.ShadowFontBuilder
@Implements(value=android.graphics.fonts.Font.Builder.class, minSdk=29) public class ShadowFontBuilder extends Object
Shadow for
Font.Builder-
Constructor Summary
Constructors Constructor Description ShadowFontBuilder() -
Method Summary
Modifier and Type Method Description protected static ByteBuffercreateBuffer(AssetManager am, String path, boolean isAsset, int cookie)Re-implement to avoid call to DirectByteBuffer#array, which is not supported on JDKprotected static ByteBuffernGetAssetBuffer(long nativeAsset)protected static longnGetNativeAsset(AssetManager assetMgr, String path, boolean isAsset, int cookie)protected static longnGetReleaseNativeAssetFunc()
-
Constructor Details
-
ShadowFontBuilder
public ShadowFontBuilder()
-
-
Method Details
-
nGetNativeAsset
@Implementation(maxSdk=29) protected static long nGetNativeAsset(AssetManager assetMgr, String path, boolean isAsset, int cookie) -
nGetAssetBuffer
-
nGetReleaseNativeAssetFunc
-
createBuffer
@Implementation(minSdk=30) protected static ByteBuffer createBuffer(AssetManager am, String path, boolean isAsset, int cookie) throws IOExceptionRe-implement to avoid call to DirectByteBuffer#array, which is not supported on JDK- Throws:
IOException
-