Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
80
BADG: Kotlin DSL Workshop
firezenk
0
87
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
94
Design patterns I
firezenk
0
93
Charla motivación Ing. Informática
firezenk
0
100
Other Decks in Programming
See All in Programming
FluorTracer / RayTracingCamp11
kugimasa
0
250
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
110
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
JETLS.jl ─ A New Language Server for Julia
abap34
2
440
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
2
530
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
チームをチームにするEM
hitode909
0
370
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
460
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
390
ゲームの物理 剛体編
fadis
0
370
AIコーディングエージェント(NotebookLM)
kondai24
0
220
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
150
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.9k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
200
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
400
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
How to Ace a Technical Interview
jacobian
281
24k
The browser strikes back
jonoalderson
0
120
Why Our Code Smells
bkeepers
PRO
340
57k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
60
37k
Reality Check: Gamification 10 Years Later
codingconduct
0
1.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
1
9
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