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
Fragments vs. CustomViews
Search
Jorge Garrido
January 30, 2018
Programming
2
160
Fragments vs. CustomViews
A quick talk showing the pros of use CustomViews instead Fragments to create our Android apps
Jorge Garrido
January 30, 2018
Tweet
Share
More Decks by Jorge Garrido
See All by Jorge Garrido
The Jetpack series: Pagination
firezenk
0
82
BADG: Kotlin DSL Workshop
firezenk
0
91
Creating Kotlin DSLs on Android
firezenk
3
170
Kotlin for dummies
firezenk
0
350
Clean Architecture at Mr.Milu
firezenk
0
190
KISS my SOLID
firezenk
0
99
Design patterns I
firezenk
0
97
Charla motivación Ing. Informática
firezenk
0
110
Other Decks in Programming
See All in Programming
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
0
140
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.4k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
570
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
860
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
230
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.4k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
290
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.2k
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
61
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Deep Space Network (abreviated)
tonyrice
0
42
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Un-Boring Meetings
codingconduct
0
200
Site-Speed That Sticks
csswizardry
13
1.1k
Navigating Team Friction
lara
192
16k
For a Future-Friendly Web
brad_frost
182
10k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
88
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
The Invisible Side of Design
smashingmag
302
51k
Ruling the World: When Life Gets Gamed
codingconduct
0
130
Transcript
#BADGlightningTalks 2018 Fragments vs CustomViews yet an old but still
present war
#BADGlightningTalks 2018 Why Fragments instead of CustomViews?
#BADGlightningTalks 2018 Manual instantiation MyFragment fragment = MyFragment.newInstance(index); FragmentTransaction ft
= getFragmentManager().beginTransaction(); ft.replace(R.id.parent, fragment); ft.commit(); MyCustomView customView = new MyCustomView(context); parentView.removeAllViews(); parentView.add(customView);
#BADGlightningTalks 2018 Embedding in xml <fragment android:name="my.package.MyFragment" android:id="@+id/my_fragment" android:layout_width="match_parent" android:layout_height="match_parent"
/> <my.package.MyCustomView android:id="@+id/my_view" android:layout_width="match_parent" android:layout_height="match_parent" />
#BADGlightningTalks 2018 Lifecyrcle
#BADGlightningTalks 2018 Wait… what?
#BADGlightningTalks 2018 So you’re using fragments… because? It’s the Google’s
way
#BADGlightningTalks 2018 Really?
#BADGlightningTalks 2018 So you’re using fragments… because? The backStack
#BADGlightningTalks 2018 Create your own! Or use a router library
like: Kartographer, Cicerone, Naviganto, Mortar, there are many!
#BADGlightningTalks 2018 So you’re using fragments… because? The savedInstance
#BADGlightningTalks 2018 Use a State class (parcelable or not) and
save it using the repository pattern
#BADGlightningTalks 2018 DON’T
#BADGlightningTalks 2018 JUST Think by your own.
#BADGlightningTalks 2018 THANKS! & : @firezenk