本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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();
}
示例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));
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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));
}
示例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));
}
示例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();
}