本文整理汇总了Java中com.facebook.common.soloader.SoLoaderShim类的典型用法代码示例。如果您正苦于以下问题:Java SoLoaderShim类的具体用法?Java SoLoaderShim怎么用?Java SoLoaderShim使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SoLoaderShim类属于com.facebook.common.soloader包,在下文中一共展示了SoLoaderShim类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ensure
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
public static synchronized void ensure() {
if (!sInitialized) {
// On Android 4.1.2 the loading of the static-webp native library can fail because
// of the dependency with fb_jpegturbo. In this case we have to explicitely load that
// library
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN) {
try {
SoLoaderShim.loadLibrary("fb_jpegturbo");
} catch (UnsatisfiedLinkError error) {
// Head in the sand
}
}
SoLoaderShim.loadLibrary("static-webp");
sInitialized = true;
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:StaticWebpNativeLoader.java
示例2: initialize
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
@Override
public void initialize() {
super.initialize();
getReactApplicationContext().addLifecycleEventListener(this);
if (!hasBeenInitialized()) {
// Make sure the SoLoaderShim is configured to use our loader for native libraries.
// This code can be removed if using Fresco from Maven rather than from source
SoLoaderShim.setHandler(new FrescoHandler());
if (mConfig == null) {
mConfig = getDefaultConfig(getReactApplicationContext());
}
Context context = getReactApplicationContext().getApplicationContext();
Fresco.initialize(context, mConfig);
sHasBeenInitialized = true;
} else if (mConfig != null) {
FLog.w(
ReactConstants.TAG,
"Fresco has already been initialized with a different config. "
+ "The new Fresco configuration will be ignored!");
}
mConfig = null;
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:23,代码来源:FrescoModule.java
示例3: initialize
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
@Override
public void initialize() {
super.initialize();
if (!hasBeenInitialized()) {
// Make sure the SoLoaderShim is configured to use our loader for native libraries.
// This code can be removed if using Fresco from Maven rather than from source
SoLoaderShim.setHandler(new FrescoHandler());
if (mConfig == null) {
mConfig = getDefaultConfig(getReactApplicationContext());
}
Context context = getReactApplicationContext().getApplicationContext();
Fresco.initialize(context, mConfig);
sHasBeenInitialized = true;
} else if (mConfig != null) {
FLog.w(
ReactConstants.TAG,
"Fresco has already been initialized with a different config. "
+ "The new Fresco configuration will be ignored!");
}
mConfig = null;
}
开发者ID:Right-Men,项目名称:Ironman,代码行数:22,代码来源:FrescoModule.java
示例4: allowNativeStaticInitializers
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
@BeforeClass
public static void allowNativeStaticInitializers() {
SoLoaderShim.setHandler(
new SoLoaderShim.Handler() {
@Override
public void loadLibrary(String libraryName) {
// ignore it
}
});
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:TestUsingNativeMemoryChunk.java
示例5: initialize
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
@Override
public void initialize() {
super.initialize();
// Make sure the SoLoaderShim is configured to use our loader for native libraries.
// This code can be removed if using Fresco from Maven rather than from source
SoLoaderShim.setHandler(new FrescoHandler());
Context context = getReactApplicationContext().getApplicationContext();
Fresco.initialize(context, mConfig);
mConfig = null;
}
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:12,代码来源:FrescoModule.java
示例6: load
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
public static void load() {
SoLoaderShim.loadLibrary("imagepipeline");
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:ImagePipelineNativeLoader.java
示例7: ensure
import com.facebook.common.soloader.SoLoaderShim; //导入依赖的package包/类
private static synchronized void ensure() {
if (!sInitialized) {
sInitialized = true;
SoLoaderShim.loadLibrary("gifimage");
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:GifImage.java
注:本文中的com.facebook.common.soloader.SoLoaderShim类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论