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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jorge Garrido
January 30, 2018
Programming
170
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
88
BADG: Kotlin DSL Workshop
firezenk
0
97
Creating Kotlin DSLs on Android
firezenk
3
190
Kotlin for dummies
firezenk
0
350
Clean Architecture at Mr.Milu
firezenk
0
200
KISS my SOLID
firezenk
0
110
Design patterns I
firezenk
0
100
Charla motivación Ing. Informática
firezenk
0
110
Other Decks in Programming
See All in Programming
Vite+ Unified Toolchain for the Web
naokihaba
0
300
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.6k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
net-httpのHTTP/2対応について
naruse
0
480
Webフレームワークの ベンチマークについて
yusukebe
0
160
JavaDoc 再入門
nagise
1
340
CSC307 Lecture 17
javiergs
PRO
0
320
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
510
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
7
4.4k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
750
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.3k
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
590
Raft: Consensus for Rubyists
vanstee
141
7.5k
Thoughts on Productivity
jonyablonski
76
5.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
How STYLIGHT went responsive
nonsquared
100
6.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Navigating Weather and Climate Data
rabernat
0
220
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