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
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
100
BADG: Kotlin DSL Workshop
firezenk
0
110
Creating Kotlin DSLs on Android
firezenk
3
200
Kotlin for dummies
firezenk
0
370
Clean Architecture at Mr.Milu
firezenk
0
210
KISS my SOLID
firezenk
0
120
Design patterns I
firezenk
0
110
Charla motivación Ing. Informática
firezenk
0
120
Other Decks in Programming
See All in Programming
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.9k
AI-Powered Domain-Driven Design
ziobrando
0
420
AmebaブログはKMPから卒業します
kmars0605
0
340
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.3k
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
11k
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
190
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
370
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
220
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Code Reviewing Like a Champion
maltzj
529
40k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
590
Writing Fast Ruby
sferik
630
63k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Documentation Writing (for coders)
carmenintech
77
5.6k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
RailsConf 2023
tenderlove
30
1.6k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Navigating Weather and Climate Data
rabernat
0
590
Joys of Absence: A Defence of Solitary Play
codingconduct
1
570
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