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
Kotlin por onde começar?
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
José Caique Oliveira
July 08, 2017
Programming
1
100
Kotlin por onde começar?
Como começar no Kotlin para Android
José Caique Oliveira
July 08, 2017
Tweet
Share
More Decks by José Caique Oliveira
See All by José Caique Oliveira
Kotlin Flow
jcaiqueoliveira
0
130
Coroutines And Flow
jcaiqueoliveira
2
120
Testing your app
jcaiqueoliveira
0
310
Modularizando seu app
jcaiqueoliveira
0
74
Nova Api de Localização Android
jcaiqueoliveira
0
97
Arquitetura para android
jcaiqueoliveira
6
320
Introdução ao Android
jcaiqueoliveira
1
92
Arquitetura para projetos Android
jcaiqueoliveira
1
240
Kotlin 1.1
jcaiqueoliveira
0
140
Other Decks in Programming
See All in Programming
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
150
20260315 AWSなんもわからん🥲
chiilog
2
160
AHC061解説
shun_pi
0
390
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
420
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
600
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
モダンOBSプラグイン開発
umireon
0
150
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Claude Code Skill入門
mayahoney
0
400
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
410
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
140
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Designing Experiences People Love
moore
143
24k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
560
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
Faster Mobile Websites
deanohume
310
31k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Six Lessons from altMBA
skipperchong
29
4.2k
Transcript
Kotlin por onde começar Caique Oliveira
val e var val nome : String = “Caique” nome
= “José” (erro) var nome1 : String = “Caique” nome1 = “Oliveira” https://goo.gl/Uef9D2
Criando um objeto class Client { } val client =
Client() https://goo.gl/1bqnX S
Kotlin é null safety cpf?.removeNonNumeric() cpf!!.removeNonNumeric() https://goo.gl/Dz47kY
Construtor no Kotlin Class Client constructor(var name: String, var city
: String) { fun printName(){ print(name) } } https://goo.gl/KFcmnV
Data class - Classes para a representação de dados data
class User(val name: String,val age: Int) https://goo.gl/DRxvPy
Criando funções com o Kotlin fun double(value: Int) : Int
{ return value * 2 } fun sum(a: Int,b : Int = 0){ return a + b } sum(1) sum(2,3) https://goo.gl/TZdf2Y
Lambdas - remove boilerplate - simplifica código button.setOnClickListener{ Toast.makeText(activity,”Olá”,Toast.LENGTH_LONG).show() }
https://goo.gl/PDbLtq
for for ( i in 0 .. 2 ) {
} for(client : Client in clients) { } https://goo.gl/fYZNNU
with with(recyclerView){ setHasFixedSize(true) layoutManager = LinearLayoutManager(activity) } https://goo.gl/PLV6fY
when when(view.id){ R.id.button1 -> { } R.id.button2 -> { }
} https://goo.gl/r5hHqX
apply - possui como referência o this dialog?.apply{ this.dismiss() }
https://goo.gl/RJzPp9
let - possui como referência o it dialog?.apply{ it.dismiss() }
https://goo.gl/VS1hWE
run - chama um bloco de código e retorna um
resultado dialog?.run{ isVisible } https://goo.gl/ChNq4d
Extensions - Possível adicionar novos comportamentos a uma classe fun
View.visible() { visibility = View.VISIBLE } antes imageView.visibility = View.VISIBLE depois imageView.visible() https://goo.gl/N4isRx
Kotlin- Extensions: Adeus findViewById adicionar ao cabeçalho do gradle: apply
plugin: ‘kotlin-android-extensions’ antes val button = findViewById(R.id.button) as Button button.setOnClickListener{ } depois //val button = findViewById(R.id.button) as Button button.setOnClickListener{ } https://goo.gl/kx1GXJ
Graduado em Ciência da computação - UFS Android Developer -
Stone Pagamentos
[email protected]
@jc_hobbit Caique Oliveira