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
  • y

    yoavst

    09/02/2017, 11:57 AM
    Bit off topic, but can you download android-26 sources for IDE?
    a
    o
    • 3
    • 2
  • c

    chansek

    09/04/2017, 9:35 AM
    Is @Parcelize working fine with normal classes or data classes for you? @sliskicode
    s
    • 2
    • 3
  • c

    chansek

    09/04/2017, 10:19 AM
    @sliskicode which version of kotlin are you using? I was using 1.1.4-2. Upgrading to 1.1.4-3 fixed my problem
    s
    • 2
    • 3
  • a

    alex.hart

    09/04/2017, 1:19 PM
    @myanmarking for some reason I think Room solely works with Flowable… I could be wrong though. It’s the only thing I remember them mentioning at IO
    m
    • 2
    • 2
  • p

    pike

    09/05/2017, 7:38 AM
    How can I pass data from an alarm(broadcast receiver) to the ui? I'm looking at view models and live data, but I'm not sure how to update the viewmodel
    :stackoverflow: 5
    d
    • 2
    • 3
  • l

    lovis

    09/05/2017, 8:08 AM
    do you have any problems? because I also wouldn’t think there are any. except the “problems” that were already there with 3.8.0 (enforced nullabilty)
    b
    • 2
    • 1
  • d

    david.bilik

    09/05/2017, 12:35 PM
    Lint inspection Unused resources are not working correctly with Kotlin? 😞 If I run that Inspection it marks (it seems) every resource that I have
    v
    • 2
    • 2
  • n

    ngubenson

    09/06/2017, 6:16 AM
    cb?.let {}
    in andriod studio, give me error tip:
    unresolved reference: let
    . But I can build it successfully by gradle. I use kotlin in my old java project. Any body knows why?
    p
    • 2
    • 2
  • p

    pablisco

    09/06/2017, 6:48 AM
    https://twitter.com/pablisc0/status/905321430258208768
    👎 1
    • 1
    • 1
  • g

    gildor

    09/06/2017, 9:22 AM
    There is kotlin compiler option: -Xno-check-impl Do not check presence of ‘impl’ modifier in multi-platform projects
    o
    k
    n
    • 4
    • 7
  • s

    Slackbot

    09/06/2017, 10:09 AM
    This message was deleted.
    g
    l
    • 3
    • 2
  • t

    tgmcians

    09/06/2017, 2:16 PM
    Does anyone know why it fails to resolve it.
    m
    b
    t
    • 4
    • 38
  • n

    ngubenson

    09/07/2017, 9:27 AM
    * What went wrong: Execution failed for task '👢transformClassesAndResourcesWithCustomProguardForRelease'.
    java.io.IOException: java.lang.IllegalArgumentException: Stacks have different current sizes [1] and [0]
    j
    d
    • 3
    • 4
  • n

    nil2l

    09/07/2017, 10:31 AM
    Hi, what’s best class to represent error in Android/Kotlin? Like NSError in mac/ios.
    e
    n
    • 3
    • 2
  • s

    stantronic

    09/07/2017, 1:19 PM
    Hi folks, I understand that Java enums are not great to use in android development, due to performance and memory overhead. Are kotlin enums any better? or just the same?
    k
    • 2
    • 6
  • s

    stantronic

    09/07/2017, 1:55 PM
    Yeah, i use them for objects, but in my case, i think I’ll stick with Ints
    d
    • 2
    • 1
  • a

    anstaendig

    09/07/2017, 3:54 PM
    #gradle might be more suitable for that question.
    s
    • 2
    • 2
  • s

    skennedy

    09/08/2017, 12:04 AM
    i have module A with
    class X
    in it, and module B which depends on A, and
    class Y : X()
    in AS, everything looks fine, and i can click through on X in Y’s declaration to open up X. however, when i build (thourgh AS or command line), it says X cannot be found. this only happens with kotlin classes
    r
    • 2
    • 3
  • m

    mradupoku

    09/08/2017, 11:47 AM
    Gradle sync failed: Failed to find target with hash string ‘android-26’ in: /Users/JEFFREY/Library/Android/sdk Consult IDE log for more details (Help | Show Log) (5s 345ms)
    m
    g
    • 3
    • 7
  • s

    stepan.zalis

    09/08/2017, 1:21 PM
    hello, does anybody know hot to get rid off unused methods in listener like at example below?
    tab_layout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
                
                override fun onTabSelected(tab: TabLayout.Tab) {
                    pager.currentItem = tab.position
                }
    
                override fun onTabUnselected(tab: TabLayout.Tab) {
                    //unused
                }
    
                override fun onTabReselected(tab: TabLayout.Tab) {
                    //unused
                }
            })
    t
    • 2
    • 1
  • n

    nil2l

    09/08/2017, 7:03 PM
    What do you think is the best solution for a network SDK?
    a
    • 2
    • 1
  • s

    smilecs

    09/09/2017, 7:58 AM
    Am curious i never learnt rxjava i didnt really see the use or maybe i was naive but now with kotlin and architecture components is there really a point to learning rxjava?
    c
    a
    v
    • 4
    • 4
  • s

    smilecs

    09/09/2017, 11:59 AM
    hey does anyone know how good parcelize library works with kotlin?
    a
    • 2
    • 5
  • t

    trubesv

    09/09/2017, 3:47 PM
    @rkeazor Thanks for your reply and suggestions! I thought about implementing what you propose first but with databinding: - the list_fragment.xml RecyclerView layout with
    android:visibility="@{adapter.itemCount > 0}
    - a list_empty.xml layout with
    android:visibility="@{adapter.itemCount == 0}
    The issue is that I have trouble linking the
    adapter
    variable to the xmls 😕
    a
    • 2
    • 9
  • t

    trubesv

    09/09/2017, 3:54 PM
    @agrosner Right, I didn't notice that, thanks for pointing it out! Is there a way I can achieve what I have in mind with databinding?
    g
    • 2
    • 2
  • r

    rkeazor

    09/09/2017, 4:23 PM
    @{condition ? View.GONE : View.VISIBLE}
    a
    • 2
    • 2
  • t

    trevjones

    09/09/2017, 8:13 PM
    can you do multiple method calls inside the lparams block or does the api depend on the return of the contained expression? also center in parent looks to override align parent right. wouldn’t it be vertical center in parent?
    r
    • 2
    • 1
  • v

    viliusk

    09/10/2017, 9:17 AM
    I'm writing Kotlin code, but I would like to see how it would look like in Java to see how much lines I'm saving.
    a
    a
    • 3
    • 4
  • j

    jw

    09/10/2017, 8:36 PM
    You definitely don't want to use the IDE generator since it doesn't maintain the code for you
    ➕ 7
    b
    • 2
    • 1
  • a

    amichalski

    09/10/2017, 8:44 PM
    I'm looking for some good tutorial or github code about Dagger 2 for Android app written in Kotlin
    :kotlin: 1
    r
    e
    +3
    • 6
    • 16
Powered by Linen
Title
a

amichalski

09/10/2017, 8:44 PM
I'm looking for some good tutorial or github code about Dagger 2 for Android app written in Kotlin
:kotlin: 1
r

radityagumay

09/11/2017, 2:03 AM
https://github.com/radityagumay/AlQuran-Android
Take a look mine.
e

edwardwongtl

09/11/2017, 3:00 AM
I think you can take a look at
Kodein
, it is a better DI library for Kotlin
➕ 4
➖ 2
m

mate.herber

09/11/2017, 7:26 AM
not compile time validated tho
g

gildor

09/11/2017, 7:51 AM
Kodein and Dagger are very different. And Kodein actually not a DI at all, but service locator
💯 1
s

sanogueralorenzo

09/11/2017, 7:51 AM
@edwardwongtl Do you have an example project? Dagger is quite handy with @Inject constructor in kotlin
r

radityagumay

09/11/2017, 7:52 AM
take a look my repo
g

gildor

09/11/2017, 7:54 AM
This repo from @kboyarshinov that contains some advanced examples of Dagger usage for Android App based on dagger-android https://github.com/kboyarshinov/advanceddagger2
s

sanogueralorenzo

09/11/2017, 7:57 AM
I was asking for Kodein example since I've only played around with it 😄
e

edwardwongtl

09/11/2017, 8:00 AM
I don't have an example project in hand by now, but you can take a look at Kodein's page to get a feel of how to use it. https://salomonbrys.github.io/Kodein/
And i think dagger2 has too much boilerplate code, maybe the cause is dagger is designed with&for java in the first place. Just a personal feel, no offense. 😀
s

sanogueralorenzo

09/11/2017, 8:08 AM
I already had a look at those, was looking more for a mvvm mvp example with the different layers in place
I felt the same about dagger but when I found out about @Inject constructor I got rid of most of the boilerplate
e

edwardwongtl

09/11/2017, 8:46 AM
But still creating a bunch of
@Provide
,
@Module
and `@Component`class & interface is too verbose for me, however dagger2 does allow easy unit testing...
r

radityagumay

10/01/2017, 11:17 AM
@edwardwongtl yes. dagger using annotation processor then create a generate code based on that annotate.
i dont know, if you can achieve such ways without annotate.
View count: 2