Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Glide cache pettern
Search
FujiKinaga
November 06, 2017
Technology
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Glide cache pettern
v3とv4で比較してみた
FujiKinaga
November 06, 2017
More Decks by FujiKinaga
See All by FujiKinaga
Flutterで実装する実践的な攻撃対策とセキュリティ向上
fujikinaga
2
1.4k
最新のCompose Multiplatform を使うとiOSとAndroidアプリはどれくらい作れるのか
fujikinaga
2
720
Androidのテストの理解を深めてみた
fujikinaga
0
74
開発案件の進み方
fujikinaga
0
120
深いい勉強会 vol.10
fujikinaga
0
110
深いい勉強会 vol.9
fujikinaga
0
120
Understanding Dagger2 Part1
fujikinaga
0
75
Mater of Subscription
fujikinaga
0
88
深いい勉強会
fujikinaga
2
89
Other Decks in Technology
See All in Technology
「待ち時間」の消滅と「自我消耗」の加速:生成AI時代のエンジニアを救うメンタル・リソース管理
poropinai1966
0
110
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
820
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
700
AI研修(Day2)【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
160
アップデートで何が変わった?デモで学んで使いこなすIBM Bob2.0
muehara
0
250
インシデント事例と パッケージの全量解析に学ぶ ソフトウェアサプライチェーンの守り方 / supply-chain-attack-defense
flatt_security
0
1k
発表と総括 / Presentations and Summary
ks91
PRO
0
210
Playwright × AI Agent でE2Eテストはどう変わるか AI駆動テストの可能性と実用検証の結果
taiga7543
2
860
AI Agent を本番環境へ―― Microsoft Foundry × Azure Serverless で作る Enterprise-Ready な基盤
shibayan
PRO
1
310
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
6
1.4k
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
270
AI時代の開発生産性を捉え直す — 経営と現場をつなぐ「開発組織のオブザーバビリティ」— / AI Dev Ex Conference 2026
tkyowa
1
1.5k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
Thoughts on Productivity
jonyablonski
76
5.3k
ラッコキーワード サービス紹介資料
rakko
1
4M
Abbi's Birthday
coloredviolet
3
8.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
KATA
mclloyd
PRO
35
15k
So, you think you're a good person
axbom
PRO
2
2.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
190
Navigating Team Friction
lara
192
16k
BBQ
matthewcrist
89
10k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
190
Transcript
Glide Cache Difference between v3 and v4
User action pattern
Seattle : v3
None
ProfilePic in Feed CollabIcon in Player BG with blur in
Player ProfilePic in Player
Stockholm : v3
None
ProfilePic in Player BG with blur in Player NotificationIcon CollabIcon
in Player CommentPic in Player ProfilePic in Feed
When reopen
What’s changed?
- ProfilePic in Feed int scaledPix = AppUtils.dpToPx(128, contactViewHolder.mImgProfilePic.getResources()); Glide.with(contactViewHolder.mImgProfilePic.getContext())
.load(AppUtils.getFeedProfilePicUrl(feed)) .override(scaledPix, scaledPix) .placeholder(R.drawable.ic_feed_placeholder) .into(contactViewHolder.mImgProfilePic); - ProfilePic in Player int scaledPixImgRound = getResources().getDimensionPixelSize(R.dimen.player_user_image_size); ← 100dp Glide.with(getContext()) .load(AppUtils.getFeedProfilePicUrl(feed)) .bitmapTransform(new CropCircleTransformation(getContext())) .override(scaledPixImgRound, scaledPixImgRound) .into(mUserImg); - CollaborationIcon in Feed int scaledPix = AppUtils.dpToPx(32, NanaApplication.getContext().getResources()); Glide.with(NanaApplication.getContext()) .load(url) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .into(new BitmapImageViewTarget(contactViewHolder.mLstCollabImages.get(currentIndex)) { @Override protected void setResource(Bitmap resource) { if (contactViewHolder.mLstCollabImages != null && contactViewHolder.mLstCollabImages.get(currentIndex) != null) { RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(contactViewHolder.mLstCollabImages.get(currentIndex).getResources(), resource); circularBitmapDrawable.setCircular(true); - CollaborationIcon in Player int scaleRatioCollab = getResources().getDimensionPixelSize(R.dimen.player_collab_user_size); ← 36dp Glide.with(getContext()) .load(picUrl) .bitmapTransform(new CropCircleTransformation(getContext())) .override(scaleRatioCollab, scaleRatioCollab) .into(mCollabImage);
- ProfilePic in Feed int scaledPix = AppUtils.dpToPx(128, contactViewHolder.mImgProfilePic.getResources()); Glide.with(contactViewHolder.mImgProfilePic.getContext())
.load(AppUtils.getFeedProfilePicUrl(feed)) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() - ProfilePic in Player int scaledPix = AppUtils.dpToPx(128, getResources()); Glide.with(getContext()) .load(description.getIconUri().toString()) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(getContext())) .into(mUserImg); - CollaborationIcon in Feed int scaledPix = AppUtils.dpToPx(48, contactViewHolder.mLstCollabImages.get(currentIndex).getResources()); Glide.with(contactViewHolder.mLstCollabImages.get(currentIndex).getContext()) .load(url) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(contactViewHolder.mLstCollabImages.get(currentIndex).getContext())) - CollaborationIcon in Player int scaledPix = AppUtils.dpToPx(48, getResources()); Glide.with(getContext()) .load(picUrl) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(getContext()))
Notice • Cache format (Drawable, Bitmap, Gif…) • Load url
• .override (int width, int height) • .transform (Blur, Brightness, Color, Circle…) • DiskCacheStrategy
??? : v4
RESOURCE : v4
Change diskCacheStrategy easily!!! ~In NanaGlideModule.class~ builder.setDefaultRequestOptions( new RequestOptions() .format(DecodeFormat.PREFER_RGB_565) .diskCacheStrategy(DiskCacheStrategy.RESOURCE));
Same with Seattle : v3
AUTOMATIC : v4
AUTOMATIC is default setting in v4 builder.setDefaultRequestOptions( new RequestOptions() .format(DecodeFormat.PREFER_RGB_565)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC));
Perfectly reuse
Reference • https://qiita.com/ronnnnn/items/ 9d82130985b5f1f6b77e • https://qiita.com/ryugoo/items/ df3ff453897379cc1bd0