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
Construindo o primeiro app usando Kotlin
Search
Filipe Guedes
September 06, 2016
Programming
0
110
Construindo o primeiro app usando Kotlin
Filipe Guedes
September 06, 2016
Tweet
Share
More Decks by Filipe Guedes
See All by Filipe Guedes
Kotlin & Android, Java é opcional
fgsguedes
2
130
Other Decks in Programming
See All in Programming
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
290
CSC307 Lecture 01
javiergs
PRO
0
680
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
150
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.4k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
440
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
600
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.7k
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
660
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
200
CSC307 Lecture 06
javiergs
PRO
0
680
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
24k
How to make the Groovebox
asonas
2
1.9k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
920
First, design no harm
axbom
PRO
2
1.1k
The Language of Interfaces
destraynor
162
26k
Done Done
chrislema
186
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
94
Chasing Engaging Ingredients in Design
codingconduct
0
110
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Transcript
Construindo o primeiro app usando Kotlin Filipe Guedes Philipe Steiff
@fgsguedes @philipesteiff
Por que Kotlin? • Concisa, simples e fácil de ler/escrever
• 100% "two-way" interoperável com Java • Também é funcional • Null-safety • Extension functions • It's fun
class Foo { fun sum(a: Int, b: Int): Int
{ return a + b } fun printSum(a: Int, b: Int): Unit { print(a + b) } }
class Foo { fun sum(a: Int, b: Int) =
a + b fun printSum(a: Int, b: Int) { print(a + b) } }
val a: Int = 1 val b = 1
var c = "Any variable" val d = Foo()
Null Safety var a: String = "abc"
Null Safety var a: String = "abc" a = null
Null Safety var a: String = "abc" a = null
// compilation error
Null Safety var a: String = "abc" a = null
// compilation error println(a.length)
Null Safety var a: String? = "abc" a = null
println(a.length)
Null Safety var a: String? = "abc" a = null
println(a.length) // compilation error
Null Safety var a: String? = "abc" a = null
println(a?.length)
Null Safety var a: String? = "abc" a = null
println(a?.length) // will print 'null'
Null Safety var a: String? = "abc" a = null
println(a?.length ?: "Was null") // will print 'Was null'
Null Safety var a: String? = "abc" a = null
println(a!!.length) // XGH
Extensions fun Parcel.readBoolean() = readByte() > 0 fun Parcel.writeBoolean(boolean:
Boolean) { when { boolean -> writeByte(1) else -> writeByte(0) } } override fun writeToParcel(parcel: Parcel, p1: Int) { parcel.writeBoolean(myBooleanField) } myBooleanField = parcel.readBoolean()
Quem está usando!?
Some live coding!! Wish us luck