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
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
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
170
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
750
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
670
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
JavaDoc 再入門
nagise
1
340
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
670
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
110
AIで効率化できた業務・日常
ochtum
0
130
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.9k
OSもどきOS
arkw
0
560
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
10
4.1k
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Docker and Python
trallard
47
3.9k
Everyday Curiosity
cassininazir
0
230
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
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