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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
180
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
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
AI & Enginnering
codelynx
0
110
AtCoder Conference 2025
shindannin
0
1k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
100
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
Package Management Learnings from Homebrew
mikemcquaid
0
200
Grafana:建立系統全知視角的捷徑
blueswen
0
320
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The World Runs on Bad Software
bkeepers
PRO
72
12k
4 Signs Your Business is Dying
shpigford
187
22k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
How STYLIGHT went responsive
nonsquared
100
6k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Practical Orchestrator
shlominoach
191
11k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
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