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


Java Glide.init方法代码示例

本文整理汇总了Java中com.bumptech.glide.Glide.init方法的典型用法代码示例。如果您正苦于以下问题:Java Glide.init方法的具体用法?Java Glide.init怎么用?Java Glide.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bumptech.glide.Glide的用法示例。


在下文中一共展示了Glide.init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  context = RuntimeEnvironment.application;

  Glide.init(new GlideBuilder().setBitmapPool(bitmapPool).build(context));
  transformation = new GifDrawableTransformation(wrapped);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:GifDrawableTransformationTest.java

示例2: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  BitmapPool pool = new BitmapPoolAdapter();
  context = RuntimeEnvironment.application;
  Glide.init(new GlideBuilder().setBitmapPool(pool).build(context));


  fitCenter = new FitCenter();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:FitCenterTest.java

示例3: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  when(pool.get(anyInt(), anyInt(), any(Bitmap.Config.class)))
      .thenAnswer(new Util.CreateBitmap());
  context = RuntimeEnvironment.application;
  Glide.init(new GlideBuilder().setBitmapPool(pool).build(context));

  centerCrop = new CenterCrop();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:CenterCropTest.java

示例4: setup

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setup() {
  MockitoAnnotations.initMocks(this);
  when(bitmapPool.get(anyInt(), anyInt(), any(Bitmap.Config.class)))
      .thenAnswer(new Util.CreateBitmap());
  Context context = RuntimeEnvironment.application;
  Glide.init(new GlideBuilder().setBitmapPool(bitmapPool).build(context));
  circleCrop = new CircleCrop();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:CircleCropTest.java

示例5: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  context = RuntimeEnvironment.application;

  Glide.init(new GlideBuilder().setBitmapPool(bitmapPool).build(context));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:BitmapTransformationTest.java

示例6: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  context = RuntimeEnvironment.application;
  BitmapPool pool = new BitmapPoolAdapter();
  Glide.init(new GlideBuilder().setBitmapPool(pool).build(context));

  centerInside = new CenterInside();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:CenterInsideTest.java

示例7: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapToTransform = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);

  context = RuntimeEnvironment.application;
  Glide.init(new GlideBuilder().setBitmapPool(bitmapPool).build(context));
  when(drawableResourceToTransform.get()).thenReturn(drawableToTransform);
  when(drawableToTransform.getBitmap()).thenReturn(bitmapToTransform);
  transformation = new BitmapDrawableTransformation(wrapped);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:BitmapDrawableTransformationTest.java

示例8: init

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
/**
 * @see Glide#init(Glide)
 */
@Deprecated
@VisibleForTesting
@SuppressLint("VisibleForTests")
public static void init(Glide glide) {
  Glide.init(glide);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:GlideApp.java

示例9: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  context = RuntimeEnvironment.application;

  Glide.init(context, new GlideBuilder().setBitmapPool(bitmapPool));
  transformation = new GifDrawableTransformation(wrapped);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:GifDrawableTransformationTest.java

示例10: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  BitmapPool pool = new BitmapPoolAdapter();
  context = RuntimeEnvironment.application;
  Glide.init(context, new GlideBuilder().setBitmapPool(pool));


  fitCenter = new FitCenter();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:FitCenterTest.java

示例11: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  when(pool.get(anyInt(), anyInt(), any(Bitmap.Config.class)))
      .thenAnswer(new Util.CreateBitmap());
  context = RuntimeEnvironment.application;
  Glide.init(context, new GlideBuilder().setBitmapPool(pool));

  centerCrop = new CenterCrop();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:CenterCropTest.java

示例12: setup

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setup() {
  MockitoAnnotations.initMocks(this);
  when(bitmapPool.get(anyInt(), anyInt(), any(Bitmap.Config.class)))
      .thenAnswer(new Util.CreateBitmap());
  Context context = RuntimeEnvironment.application;
  Glide.init(context, new GlideBuilder().setBitmapPool(bitmapPool));
  circleCrop = new CircleCrop();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:CircleCropTest.java

示例13: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  context = RuntimeEnvironment.application;

  Glide.init(context, new GlideBuilder().setBitmapPool(bitmapPool));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:BitmapTransformationTest.java

示例14: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  transformation = new DrawableTransformation(bitmapTransformation, /*isRequired=*/ true);
  context = RuntimeEnvironment.application;
  bitmapPool = new BitmapPoolAdapter();
  Glide.init(context, new GlideBuilder().setBitmapPool(bitmapPool));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:DrawableTransformationTest.java

示例15: setUp

import com.bumptech.glide.Glide; //导入方法依赖的package包/类
@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  bitmapWidth = 100;
  bitmapHeight = 100;
  Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
  when(resource.get()).thenReturn(bitmap);

  context = RuntimeEnvironment.application;
  BitmapPool pool = new BitmapPoolAdapter();
  Glide.init(context, new GlideBuilder().setBitmapPool(pool));

  centerInside = new CenterInside();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:CenterInsideTest.java


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