https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
android
  • s

    Slackbot

    08/28/2017, 10:37 AM
    This message was deleted.
    o
    • 2
    • 2
  • m

    mcscruff

    08/28/2017, 11:52 PM
    hi all, all day i have been struggling to get a new activity to load from a recycleview custom adapter, i have a click listener within the customadapter but i am unable to get any further
    h
    • 2
    • 1
  • m

    mcscruff

    08/29/2017, 12:29 AM
    i can get it to work from the mainactivity.kt but not from CustomAdapter.kt , startActivity() isnt there
    g
    • 2
    • 1
  • u

    540grunkspin

    08/29/2017, 7:57 AM
    The error i get is “cycling dependency detected error.NonExistentClass is injected at” and the location it is injected at is where i bind Interface.Factory so more or less is seems like the Implementation.Factory class becomes NonExistentClass in the incremental build for some reason.
    g
    • 2
    • 3
  • c

    catalin.morosan

    08/29/2017, 9:54 AM
    hey guys. In an android module, in a kotlin file, I am accessing a java class from a jar and Android Studio is showing me the error "Cannot access class X : Check your module classpath for missing or conflicting dependencies". The code builds and runs ok but I keep seeing this error in the IDE. Any help? (android studio 2.3)
    t
    • 2
    • 2
  • u

    540grunkspin

    08/29/2017, 10:56 AM
    Does anyone know where to report issues like this. I haven't found an issue tracker for kapt yet. Is it just shared with the kotlin one?
    v
    g
    • 3
    • 5
  • g

    gildor

    08/30/2017, 2:43 AM
    @ankitdroiddeveloper Particulary for your view it would be look like:
    class FreeView @JvmOverloads constructor(
      context: Context, 
      attrs: AttributeSet? = null,  
      defStyleAttr: Int = 0
    ) : View(context, attrs, defStyleAttr) {
        init {
           // Your code to init view
        }
    }
    👍 4
    k
    • 2
    • 1
  • l

    landoulsi

    08/30/2017, 11:18 AM
    what is the best way to implement a Singleton pattern in Kotlin ?
    :stackoverflow: 3
    v
    s
    +2
    • 5
    • 4
  • d

    Daniel

    08/30/2017, 7:02 PM
    Depends what object it is.. With view objects you can kill the memory pretty fast.
    l
    • 2
    • 1
  • j

    jw

    08/30/2017, 7:59 PM
    orms are bad
    ➕ 3
    👎 1
    d
    • 2
    • 1
  • j

    jw

    08/30/2017, 7:59 PM
    Room or SQL Delight
    ➕ 2
    b
    • 2
    • 5
  • j

    jw

    08/30/2017, 8:03 PM
    you query
    User
    on a background thread, post it to the main thread to display, and then attempt to traverse a relation
    d
    • 2
    • 2
  • j

    jw

    08/30/2017, 8:03 PM
    Room and SQL Delight are object mappers–no relational mapping
    k
    • 2
    • 1
  • j

    jw

    08/30/2017, 8:40 PM
    threads are worse than ORMs
    😂 5
    a
    • 2
    • 5
  • j

    jw

    08/30/2017, 8:41 PM
    ORMs are fine on the server where you have threads you can block
    o
    c
    • 3
    • 4
  • g

    gabrielfv

    08/30/2017, 10:52 PM
    So Dagger it is
    v
    • 2
    • 1
  • g

    gabrielfv

    08/30/2017, 10:53 PM
    About the second question, I was thinking about an internal project to get them used to the idea (something that could be used by the company). Any better ideas?
    k
    • 2
    • 2
  • a

    adi

    08/30/2017, 10:57 PM
    1) Am I testing wrong if I am trying to mock data classes in kotlin? 2) If the answer for first question is no, I am having issues mocking it with Mockito 2 even after following this article by Haidi hariri. http://hadihariri.com/2016/10/04/Mocking-Kotlin-With-Mockito/ Do I have to do something on top of it?
    g
    b
    • 3
    • 5
  • c

    codeslubber

    08/31/2017, 4:54 AM
    has anyone tried Things yet? should there be another channel for it? would love to port one of the tutorials to K…
    g
    • 2
    • 17
  • q

    quock

    08/31/2017, 11:12 AM
    I am trying IO operation in IntentService at onHandleIntent method but it is not guarantee to call every time and many times skip network call. Can anyway handle network call in background ?
    z
    d
    • 3
    • 4
  • r

    raghuramjampala

    08/31/2017, 1:25 PM
    Hey Guys did anyone have issues in adding @OnClick annotation for kotlin activity using butterknife it doesn't look like the listener getting called
    a
    • 2
    • 7
  • j

    jw

    08/31/2017, 5:50 PM
    call its methods to control the style, just like you would in Java: https://developer.android.com/reference/android/widget/TextView.html
    🎖️ 5
    j
    k
    +2
    • 5
    • 4
  • j

    jw

    08/31/2017, 7:11 PM
    is there?
    d
    k
    • 3
    • 3
  • k

    kirillrakhman

    09/01/2017, 1:43 PM
    has anyone seen this https://www.appbrain.com/stats/libraries/details/kotlin/kotlin?
    a
    • 2
    • 2
  • k

    kirillrakhman

    09/01/2017, 1:44 PM
    4.40% of top 500 apps use kotlin
    d
    • 2
    • 1
  • p

    pablisco

    09/01/2017, 2:35 PM
    In case someone is interested: https://medium.com/pablisco/extending-resources-61134cbd809c Disclaimer: it’s mine 😄
    e
    y
    • 3
    • 7
  • m

    morozov

    09/01/2017, 4:13 PM
    how i can initialized var in interface?
    d
    p
    +2
    • 5
    • 16
  • j

    jw

    09/01/2017, 6:56 PM
    well, both! https://github.com/gildor/kotlin-coroutines-retrofit
    🎖️ 2
    b
    g
    • 3
    • 8
  • j

    jw

    09/01/2017, 6:58 PM
    a problem with that, though, is that calling
    await()
    also triggers the request. you need to way to trigger both requests at once and then await on both. I don't know how to do it off-hand and without trying it myself. You can try asking in #coroutines though.
    g
    • 2
    • 1
  • t

    tgmcians

    09/01/2017, 8:22 PM
    toolbar?.let { val textView: TextView = it.findViewById(R.id.titleToolbar) textView.text = getString(R.string.tb_home) }
    b
    • 2
    • 1
Powered by Linen
Title
t

tgmcians

09/01/2017, 8:22 PM
toolbar?.let { val textView: TextView = it.findViewById(R.id.titleToolbar) textView.text = getString(R.string.tb_home) }
b

budioktaviyan

09/02/2017, 1:05 AM
use the kotlin android extensions, could save you more than this. like
toolbar?.let { titleToolbar.text = getString(R.string.tb_home) }
View count: 1