当前位置: 首页>>代码示例>>Java>>正文


Java Glide.get方法代码示例

本文整理汇总了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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:RequestManagerRetriever.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:25,代码来源:RequestManagerRetriever.java

示例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)));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:37,代码来源:GifDrawable.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:RequestManagerRetriever.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:RequestManagerRetriever.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:RequestManagerRetriever.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:RequestManagerRetriever.java

示例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();
}
 
开发者ID:KwalaGroup,项目名称:Android-Client,代码行数:14,代码来源:NetworkStore.java

示例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();
}
 
开发者ID:coderwjq,项目名称:ZhaZhaShop,代码行数:10,代码来源:GlideManager.java

示例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)));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:37,代码来源:GifDrawable.java

示例11: getGlideSingleton

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
private static Glide getGlideSingleton() {
  return Glide.get(RuntimeEnvironment.application);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:GifFrameLoaderTest.java

示例12: get

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
/**
 * @see Glide#get(Context)
 */
public static Glide get(Context context) {
  return Glide.get(context);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:GlideApp.java


注:本文中的com.bumptech.glide.Glide.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。