Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Kotlin por onde começar?
Search
José Caique Oliveira
July 08, 2017
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin por onde começar?
Como começar no Kotlin para Android
José Caique Oliveira
July 08, 2017
More Decks by José Caique Oliveira
See All by José Caique Oliveira
Kotlin Flow
jcaiqueoliveira
0
140
Coroutines And Flow
jcaiqueoliveira
2
150
Testing your app
jcaiqueoliveira
0
340
Modularizando seu app
jcaiqueoliveira
0
92
Nova Api de Localização Android
jcaiqueoliveira
0
110
Arquitetura para android
jcaiqueoliveira
6
330
Introdução ao Android
jcaiqueoliveira
1
110
Arquitetura para projetos Android
jcaiqueoliveira
1
270
Kotlin 1.1
jcaiqueoliveira
0
160
Other Decks in Programming
See All in Programming
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
150
Domain-Driven Transformation
hschwentner
2
2.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
620
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
すこし踏み込む CancellationToken
htkym
2
1.7k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
パスワード再設定メールのURLについて知っておこう
uyuki234
0
130
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
setup-vp GitLab対応の裏側
naokihaba
0
160
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
970
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Documentation Writing (for coders)
carmenintech
77
5.6k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
The agentic SEO stack - context over prompts
schlessera
0
970
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Faster Mobile Websites
deanohume
310
32k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
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