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
170
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
95
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
100
Design patterns I
firezenk
0
100
Charla motivación Ing. Informática
firezenk
0
110
Other Decks in Programming
See All in Programming
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
130
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
550
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
410
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
300
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
560
Rethinking API Platform Filters
vinceamstoutz
0
150
Feature Toggle は捨てやすく使おう
gennei
0
250
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
120
Windows on Ryzen and I
seosoft
0
360
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Everyday Curiosity
cassininazir
0
170
Darren the Foodie - Storyboard
khoart
PRO
3
2.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
770
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
76
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
500
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Music & Morning Musume
bryan
47
7.1k
Context Engineering - Making Every Token Count
addyosmani
9
770
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.5k
HDC tutorial
michielstock
1
580
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