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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
José Caique Oliveira
July 08, 2017
Programming
100
1
Share
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
120
Testing your app
jcaiqueoliveira
0
310
Modularizando seu app
jcaiqueoliveira
0
75
Nova Api de Localização Android
jcaiqueoliveira
0
99
Arquitetura para android
jcaiqueoliveira
6
320
Introdução ao Android
jcaiqueoliveira
1
94
Arquitetura para projetos Android
jcaiqueoliveira
1
240
Kotlin 1.1
jcaiqueoliveira
0
140
Other Decks in Programming
See All in Programming
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
450
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
560
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
Feature Toggle は捨てやすく使おう
gennei
0
510
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
790
10 Tips of AWS ~Gen AI on AWS~
licux
4
110
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
630
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
2
260
KagglerがMixSeekを触ってみた
morim
0
370
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
170
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
We Are The Robots
honzajavorek
0
210
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Making Projects Easy
brettharned
120
6.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
How STYLIGHT went responsive
nonsquared
100
6k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
AI: The stuff that nobody shows you
jnunemaker
PRO
5
530
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