Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Fragments vs. CustomViews
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jorge Garrido
January 30, 2018
Programming
180
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Fragments vs. CustomViews
A quick talk showing the pros of use CustomViews instead Fragments to create our Android apps
Jorge Garrido
January 30, 2018
More Decks by Jorge Garrido
See All by Jorge Garrido
The Jetpack series: Pagination
firezenk
0
98
BADG: Kotlin DSL Workshop
firezenk
0
99
Creating Kotlin DSLs on Android
firezenk
3
190
Kotlin for dummies
firezenk
0
360
Clean Architecture at Mr.Milu
firezenk
0
210
KISS my SOLID
firezenk
0
110
Design patterns I
firezenk
0
110
Charla motivación Ing. Informática
firezenk
0
120
Other Decks in Programming
See All in Programming
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
150
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
スマート反転とウェブアクセシビリティ
camiha
0
200
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
780
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
150
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.8k
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
300
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
For a Future-Friendly Web
brad_frost
183
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Claude Code のすすめ
schroneko
67
230k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
How to Ace a Technical Interview
jacobian
281
24k
Google's AI Overviews - The New Search
badams
0
1.6k
Paper Plane
katiecoart
PRO
3
53k
Bash Introduction
62gerente
615
220k
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