use of com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions in project 91Pop by DanteAndroid.
the class UnLimit91Adapter method convert.
@Override
protected void convert(BaseViewHolder helper, UnLimit91PornItem item) {
helper.setText(R.id.tv_91porn_item_title, item.getTitleWithDuration());
helper.setText(R.id.tv_91porn_item_info, item.getInfo());
ImageView simpleDraweeView = helper.getView(R.id.iv_91porn_item_img);
Uri uri = Uri.parse(item.getImgUrl());
GlideApp.with(helper.itemView).load(uri).placeholder(R.drawable.placeholder).transition(new DrawableTransitionOptions().crossFade(300)).into(simpleDraweeView);
}
use of com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions in project 91Pop by DanteAndroid.
the class UserLoginActivity method loadCaptcha.
/**
* 加载验证码,目前似乎是非必须,不填也是可以登录的
*/
private void loadCaptcha() {
String url = addressHelper.getVideo91PornAddress() + "captcha.php";
Logger.t(TAG).d("验证码链接:" + url);
Uri uri = Uri.parse(url);
GlideApp.with(this).load(uri).placeholder(R.drawable.placeholder).transition(new DrawableTransitionOptions().crossFade(300)).diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true).into(simpleDraweeView);
}
use of com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions in project 91Pop by DanteAndroid.
the class UserRegisterActivity method loadCaptcha.
/**
* 加载验证码,目前似乎是非必须,不填也是可以登录的
*/
private void loadCaptcha() {
String url = addressHelper.getVideo91PornAddress() + "captcha2.php";
Logger.t(TAG).d("验证码链接:" + url);
Uri uri = Uri.parse(url);
GlideApp.with(this).load(uri).placeholder(R.drawable.placeholder).transition(new DrawableTransitionOptions().crossFade(300)).diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true).into(wbCaptcha);
}
use of com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions in project 91Pop by DanteAndroid.
the class ExoMediaPlayerActivity method playVideo.
@Override
public void playVideo(String title, String videoUrl, String name, String thumImgUrl) {
if (isPauseByActivityEvent) {
isPauseByActivityEvent = false;
videoPlayer.reset();
}
videoControlsMobile.setOnBackButtonClickListener(new ExoVideoControlsMobile.OnBackButtonClickListener() {
@Override
public void onBackClick(View view) {
onBackPressed();
}
});
if (!TextUtils.isEmpty(thumImgUrl)) {
GlideApp.with(this).load(Uri.parse(thumImgUrl)).transition(new DrawableTransitionOptions().crossFade(300)).into(videoPlayer.getPreviewImageView());
}
// 加载本地下载好的视频
if (unLimit91PornItem.getStatus() == FileDownloadStatus.completed) {
File downloadFile = new File(unLimit91PornItem.getDownLoadPath(dataManager));
if (downloadFile.exists()) {
videoPlayer.setVideoPath(downloadFile.getAbsolutePath());
} else {
String proxyUrl = httpProxyCacheServer.getProxyUrl(videoUrl);
videoPlayer.setVideoURI(Uri.parse(proxyUrl));
}
} else {
String proxyUrl = httpProxyCacheServer.getProxyUrl(videoUrl);
videoPlayer.setVideoURI(Uri.parse(proxyUrl));
}
videoControlsMobile.setTitle(title);
}
use of com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions in project glide by bumptech.
the class GlideContextTest method getDefaultTransitionOptions_withSuperClassRegistered_returnsSuperClassOptions.
@Test
public void getDefaultTransitionOptions_withSuperClassRegistered_returnsSuperClassOptions() {
DrawableTransitionOptions expected = new DrawableTransitionOptions();
transitionOptions.put(Drawable.class, expected);
assertThat(context.getDefaultTransitionOptions(BitmapDrawable.class)).isEqualTo(expected);
assertThat(context.getDefaultTransitionOptions(GifDrawable.class)).isEqualTo(expected);
}
Aggregations