本文整理汇总了Java中com.github.florent37.glidepalette.GlidePalette类的典型用法代码示例。如果您正苦于以下问题:Java GlidePalette类的具体用法?Java GlidePalette怎么用?Java GlidePalette使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GlidePalette类属于com.github.florent37.glidepalette包,在下文中一共展示了GlidePalette类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: VehicleAdapter
import com.github.florent37.glidepalette.GlidePalette; //导入依赖的package包/类
public VehicleAdapter(Context context) {
launchers = new ArrayList();
this.mContext = context;
night = ListPreferences.getInstance(mContext).isNightModeActive(mContext);
if (ListPreferences.getInstance(context).isNightModeActive(context)) {
palette = GlidePalette.Profile.MUTED_DARK;
} else {
palette = GlidePalette.Profile.VIBRANT;
}
requestOptions = new RequestOptions()
.placeholder(R.drawable.placeholder)
.centerCrop();
}
开发者ID:ItsCalebJones,项目名称:SpaceLaunchNow-Android,代码行数:17,代码来源:VehicleAdapter.java
示例2: OrbiterAdapter
import com.github.florent37.glidepalette.GlidePalette; //导入依赖的package包/类
public OrbiterAdapter(Context context) {
orbiters = new ArrayList();
this.mContext = context;
night = ListPreferences.getInstance(mContext).isNightModeActive(mContext);
if (ListPreferences.getInstance(context).isNightModeActive(context)) {
palette = GlidePalette.Profile.MUTED_DARK;
} else {
palette = GlidePalette.Profile.VIBRANT;
}
requestOptions = new RequestOptions()
.placeholder(R.drawable.placeholder)
.centerCrop();
}
开发者ID:ItsCalebJones,项目名称:SpaceLaunchNow-Android,代码行数:17,代码来源:OrbiterAdapter.java
示例3: initUI
import com.github.florent37.glidepalette.GlidePalette; //导入依赖的package包/类
private void initUI(){
if (show != null) {
mainBackground.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
String backdropImgUrl = BuildConfig.IMG_BASE_URL + backdropSize + show.getBackdropPath();
initToolbar();
initFab();
initViewPager(viewpager, show);
loadVideosAndReviews(show);
Glide.with(this)
.load(backdropImgUrl)
.asBitmap()
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.listener(GlidePalette.with(backdropImgUrl).intoCallBack(this))
.into(backdrop);
} else {
Log.e(TAG, "initUI: movie is null");
}
}
开发者ID:ivanisidrowu,项目名称:TvEnthusiast,代码行数:22,代码来源:DetailFragment.java
示例4: onBindViewHolder
import com.github.florent37.glidepalette.GlidePalette; //导入依赖的package包/类
@Override public void onBindViewHolder(ViewHolder vh, int i) {
Glide.with(mContext).load(mResponse.getResults().get(i).getUrl()).bitmapTransform(
new CenterCrop(mPool), new RoundedCornersTransformation(mPool, 8, 0))
//.crossFade()
.listener(
GlidePalette.with(mResponse.getResults().get(i).getUrl()).intoCallBack(palette -> {
if (mPaletteCallback != null) mPaletteCallback.onPaletteReady(i, palette);
})).diskCacheStrategy(DiskCacheStrategy.ALL).into(vh.meiZi);
}
开发者ID:pkliang,项目名称:gankmaku,代码行数:10,代码来源:FuliAdapter.java
示例5: onBindViewHolder
import com.github.florent37.glidepalette.GlidePalette; //导入依赖的package包/类
@Override
public void onBindViewHolder(WallpaperViewHolder holder, int index) {
final WallpaperUtils.Wallpaper wallpaper =
mFiltered != null ? mFiltered.get(index) : mWallpapers.get(index);
holder.name.setText(wallpaper.name);
holder.author.setText(wallpaper.author);
holder.itemView.setTag("view_" + index);
ViewCompat.setTransitionName(holder.image, "view_" + index);
holder.name.setWallpaper(wallpaper);
holder.colorFrame.setWallpaper(wallpaper);
holder.author.setWallpaper(wallpaper);
holder.image.setProgressBar(holder.progress);
holder.progress.setVisibility(View.VISIBLE);
if (wallpaper.isPaletteComplete()) {
Log.d(
"WallpaperAdapter",
String.format(
"Wallpaper %d (%s) palette is complete!", index, wallpaper.getListingImageUrl()));
holder.name.setTextColor(wallpaper.getPaletteNameColor());
holder.author.setTextColor(wallpaper.getPaletteAuthorColor());
holder.colorFrame.setBackgroundColor(wallpaper.getPaletteBgColor());
Glide.with(holder.itemView.getContext())
.load(wallpaper.getListingImageUrl())
.apply(
new RequestOptions()
.transform(new KeepRatio())
.diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.into(holder.image);
} else {
Log.d(
"WallpaperAdapter",
String.format(
"Wallpaper %d (%s) palette is not complete...",
index, wallpaper.getListingImageUrl()));
holder.name.setTextColor(Color.WHITE, false);
holder.author.setTextColor(Color.WHITE, false);
holder.colorFrame.setBackgroundColor(Color.DKGRAY, false);
//noinspection unchecked
Glide.with(holder.itemView.getContext())
.load(wallpaper.getListingImageUrl())
.apply(
new RequestOptions()
.transform(new KeepRatio())
.diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.listener(
GlidePalette.with(wallpaper.getListingImageUrl())
.use(GlidePalette.Profile.VIBRANT)
.intoBackground(holder.colorFrame)
.intoTextColor(holder.name, GlidePalette.Swatch.TITLE_TEXT_COLOR)
.intoTextColor(holder.author, GlidePalette.Swatch.BODY_TEXT_COLOR))
.into(holder.image);
}
}
开发者ID:afollestad,项目名称:polar-dashboard,代码行数:57,代码来源:WallpaperAdapter.java
注:本文中的com.github.florent37.glidepalette.GlidePalette类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论