本文整理汇总了Java中com.bumptech.glide.Glide.get方法的典型用法代码示例。如果您正苦于以下问题:Java Glide.get方法的具体用法?Java Glide.get怎么用?Java Glide.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bumptech.glide.Glide
的用法示例。
在下文中一共展示了Glide.get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getApplicationManager
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager getApplicationManager(Context context) {
// Either an application context or we're on a background thread.
if (applicationManager == null) {
synchronized (this) {
if (applicationManager == null) {
// Normally pause/resume is taken care of by the fragment we add to the fragment or
// activity. However, in this case since the manager attached to the application will not
// receive lifecycle events, we must force the manager to start resumed using
// ApplicationLifecycle.
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context);
applicationManager =
factory.build(glide, new ApplicationLifecycle(), new EmptyRequestManagerTreeNode());
}
}
}
return applicationManager;
}
示例2: getApplicationManager
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager getApplicationManager(Context context) {
// Either an application context or we're on a background thread.
if (applicationManager == null) {
synchronized (this) {
if (applicationManager == null) {
// Normally pause/resume is taken care of by the fragment we add to the fragment or
// activity. However, in this case since the manager attached to the application will not
// receive lifecycle events, we must force the manager to start resumed using
// ApplicationLifecycle.
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context.getApplicationContext());
applicationManager =
factory.build(
glide,
new ApplicationLifecycle(),
new EmptyRequestManagerTreeNode(),
context.getApplicationContext());
}
}
}
return applicationManager;
}
示例3: GifDrawable
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
/**
* Constructor for GifDrawable.
*
* @param context A context.
* @param frameTransformation An {@link com.bumptech.glide.load.Transformation} that can be
* applied to each frame.
* @param targetFrameWidth The desired width of the frames displayed by this drawable (the
* width of the view or
* {@link com.bumptech.glide.request.target.Target}
* this drawable is being loaded into).
* @param targetFrameHeight The desired height of the frames displayed by this drawable (the
* height of the view or
* {@link com.bumptech.glide.request.target.Target}
* this drawable is being loaded into).
* @param gifDecoder The decoder to use to decode GIF data.
* @param firstFrame The decoded and transformed first frame of this GIF.
* @see #setFrameTransformation(com.bumptech.glide.load.Transformation, android.graphics.Bitmap)
*/
public GifDrawable(
Context context,
GifDecoder gifDecoder,
Transformation<Bitmap> frameTransformation,
int targetFrameWidth,
int targetFrameHeight,
Bitmap firstFrame) {
this(
new GifState(
new GifFrameLoader(
// TODO(b/27524013): Factor out this call to Glide.get()
Glide.get(context),
gifDecoder,
targetFrameWidth,
targetFrameHeight,
frameTransformation,
firstFrame)));
}
示例4: fragmentGet
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager fragmentGet(Context context, android.app.FragmentManager fm,
android.app.Fragment parentHint) {
RequestManagerFragment current = getRequestManagerFragment(fm, parentHint);
RequestManager requestManager = current.getRequestManager();
if (requestManager == null) {
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context);
requestManager =
factory.build(glide, current.getLifecycle(), current.getRequestManagerTreeNode());
current.setRequestManager(requestManager);
}
return requestManager;
}
示例5: supportFragmentGet
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager supportFragmentGet(Context context, FragmentManager fm,
Fragment parentHint) {
SupportRequestManagerFragment current = getSupportRequestManagerFragment(fm, parentHint);
RequestManager requestManager = current.getRequestManager();
if (requestManager == null) {
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context);
requestManager =
factory.build(glide, current.getLifecycle(), current.getRequestManagerTreeNode());
current.setRequestManager(requestManager);
}
return requestManager;
}
示例6: fragmentGet
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager fragmentGet(Context context, android.app.FragmentManager fm,
android.app.Fragment parentHint) {
RequestManagerFragment current = getRequestManagerFragment(fm, parentHint);
RequestManager requestManager = current.getRequestManager();
if (requestManager == null) {
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context);
requestManager =
factory.build(
glide, current.getGlideLifecycle(), current.getRequestManagerTreeNode(), context);
current.setRequestManager(requestManager);
}
return requestManager;
}
示例7: supportFragmentGet
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private RequestManager supportFragmentGet(Context context, FragmentManager fm,
Fragment parentHint) {
SupportRequestManagerFragment current = getSupportRequestManagerFragment(fm, parentHint);
RequestManager requestManager = current.getRequestManager();
if (requestManager == null) {
// TODO(b/27524013): Factor out this Glide.get() call.
Glide glide = Glide.get(context);
requestManager =
factory.build(
glide, current.getGlideLifecycle(), current.getRequestManagerTreeNode(), context);
current.setRequestManager(requestManager);
}
return requestManager;
}
示例8: clearData
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
public void clearData() {
kwalaCookieStore.removeAll();
final Glide glide = Glide.get(KwalaApplication.getInstance());
glide.clearMemory();
new Thread(new Runnable() {
@Override
public void run() {
glide.clearDiskCache();
}
}).start();
}
示例9: clearPicCache
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
public static void clearPicCache(Context context) {
final Glide glide = Glide.get(context);
new Thread(new Runnable() {
@Override
public void run() {
glide.clearDiskCache();
}
}).start();
}
示例10: GifDrawable
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
/**
* Constructor for GifDrawable.
*
* @param context A context.
* @param bitmapPool A {@link com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool}
* that can be used to return the first frame when this drawable is
* recycled.
* @param frameTransformation An {@link com.bumptech.glide.load.Transformation} that can be
* applied to each frame.
* @param targetFrameWidth The desired width of the frames displayed by this drawable (the
* width of the view or
* {@link com.bumptech.glide.request.target.Target}
* this drawable is being loaded into).
* @param targetFrameHeight The desired height of the frames displayed by this drawable (the
* height of the view or
* {@link com.bumptech.glide.request.target.Target}
* this drawable is being loaded into).
* @param gifDecoder The decoder to use to decode GIF data.
* @param firstFrame The decoded and transformed first frame of this GIF.
* @see #setFrameTransformation(com.bumptech.glide.load.Transformation, android.graphics.Bitmap)
*/
public GifDrawable(Context context, GifDecoder gifDecoder, BitmapPool bitmapPool,
Transformation<Bitmap> frameTransformation, int targetFrameWidth, int targetFrameHeight,
Bitmap firstFrame) {
this(
new GifState(
bitmapPool,
new GifFrameLoader(
// TODO(b/27524013): Factor out this call to Glide.get()
Glide.get(context),
gifDecoder,
targetFrameWidth,
targetFrameHeight,
frameTransformation,
firstFrame)));
}
示例11: getGlideSingleton
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private static Glide getGlideSingleton() {
return Glide.get(RuntimeEnvironment.application);
}
示例12: get
import com.bumptech.glide.Glide; //导入方法依赖的package包/类
/**
* @see Glide#get(Context)
*/
public static Glide get(Context context) {
return Glide.get(context);
}