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
Exploring Kotlin + Anko
Search
Rakshak R.Hegde
September 03, 2016
Programming
0
59
Exploring Kotlin + Anko
Brief Introduction to Kotlin & Anko, a replacement to XML views used in Android.
Rakshak R.Hegde
September 03, 2016
Tweet
Share
More Decks by Rakshak R.Hegde
See All by Rakshak R.Hegde
Android Workshop
rakshakhegde
0
54
Other Decks in Programming
See All in Programming
Tailwind CSSを本気でカスタマイズする方法
fsubal
15
5.5k
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.8k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
WebGLで始める コンピュータグラフィックス入門
heller77
0
330
Node.js v22 で変わること
yosuke_furukawa
PRO
12
4k
dbtのドメイン分割による データ基盤の改善とDigdagとの連携
sakama
0
470
Try creating your own orderedmap
kazamori
1
260
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
Deep Dive into React Stream/Serialize
mugi_uno
3
740
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.4k
AppRouter Panel Talk
yosuke_furukawa
PRO
1
490
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
530
Featured
See All Featured
How to Ace a Technical Interview
jacobian
273
22k
Designing with Data
zakiwarfel
96
4.8k
The Invisible Side of Design
smashingmag
294
49k
Statistics for Hackers
jakevdp
790
220k
Documentation Writing (for coders)
carmenintech
60
4k
Atom: Resistance is Futile
akmur
260
25k
Why Our Code Smells
bkeepers
PRO
331
56k
Producing Creativity
orderedlist
PRO
338
39k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Automating Front-end Workflow
addyosmani
1357
200k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Faster Mobile Websites
deanohume
300
30k
Transcript
Exploring Kotlin + Anko Alternative to booaring repetitive XML Views
@rakshakhegde @blrdroid
Anko... Wut? verticalLayout { val name = editText() button("Say Hello")
{ onClick { toast("Hello, ${name.text}!") } } }
What I’ll cover, hopefully :) 1. Kotlin & Anko 2.
How to use Anko in Activity 3. Makin’ it modular - AnkoComponents 4. How Anko works - Extension funcs & Lambdas
But First...
Kotlin + Any? = ❤ kotlinlang.org
1. Set. Up. > New Project in Android Studio >
Kotlin Plugin > Configure Kotlin ⌘⌥A > Summon Anko > Install DSL Preview Plugin > sudo rm -rf / # fo shitzengiggles
Show me code, bro 2. Using Anko
Handy Tools in Android Studio - Convert Java code to
Kotlin - Convert XML to Anko
Pick n Choose, Runtime Configs - Screen Size - Density
- Orientation - Right to Left languages/locales - API Qualifiers - doIfSdk / doFromSdk
What next…? > kotlinlang.org > Kotlin Koans/Tutorials > Google “anko
kotlin” > giyf.com
I wanna talk about... ➔ AnkoComponents vs XML ➔ Styles
& Themes ➔ Paint & Performance ➔ Kotlin Delegates ➔ All types of drawables - Bitmap, 9-Patch, LayerList, ColorStateList, Shape Drawable, Selectors, Color Drawable, VectorDrawable ➔ Accessibility - Screen Reader ➔ AnimatedVectorDrawable ➔ Dieting Apps - Lean Apks ➔ Flow + Mortar
(@/+/git)rakshakhegde