https://kotlinlang.org logo
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
  • u

    ubu

    09/10/2018, 10:45 AM
    class App : Application, SomeBehavior by someObject
    @no, this line is invalid, as I have no access to someObject in class declaration.
    m
    p
    +3
    • 6
    • 8
  • l

    lexardi

    09/10/2018, 11:05 AM
    Hi guys, does anyone use kotlin coroutines and rx in one project in production? I'd like to substitute rx, but coroutines streams (Channels) seems a bit "excessive"
    g
    a
    • 3
    • 5
  • a

    Aamer Paul

    09/11/2018, 11:32 AM
    How to handle this?
    d
    l
    r
    • 4
    • 7
  • n

    Nawin

    09/12/2018, 4:38 AM
    Has anyone faced this issue? https://stackoverflow.com/questions/52273867/mockito-kotlin-unit-testing-method-called-verification-throws-null-pointer-excep
    j
    r
    • 3
    • 15
  • m

    mingkangpan

    09/12/2018, 2:10 PM
    hey I am wondering where the code of android ktx is hosted now since the github repo is not used anymore according to README
    t
    • 2
    • 1
  • o

    oday

    09/12/2018, 2:14 PM
    not much to do with Kotlin and Android together, but just Android, how do you organize your dimens.xml? I was thinking of having preset numbers from 10 to X, with 10 and 5 intervals in between
    r
    d
    • 3
    • 6
  • r

    rkeazor

    09/12/2018, 2:31 PM
    @dave08 and @Nawin lets move these to the #test channel
    d
    • 2
    • 1
  • m

    Mr Unlimited

    09/12/2018, 4:27 PM
    I converted my android app to kotlin and I'm faced with a class.java unable to resolve error......😫
    g
    • 2
    • 6
  • s

    stefan

    09/12/2018, 7:12 PM
    Hello. Not sure this is the right place to ask this, but here we go. I've been playing with Kotlin for a few weeks now and I also did some Java/Scala in the past. I want to build an android app (with Kotlin), but I have zero experience with android development. I googled a bit, and there are lots of resources but I don't know what to choose. Any advice?
    r
    • 2
    • 1
  • u

    ursus

    09/12/2018, 9:34 PM
    Whats the state of kotlin in gradle? Is it out yet?
    e
    • 2
    • 4
  • c

    CamilleBC

    09/13/2018, 3:25 PM
    Hello ! If I create a fragment programmatically, should I add Observers on a view for some LiveData (in a ViewModel) in the
    onCreateView
    function, or somewhere else?
    d
    s
    • 3
    • 5
  • s

    supotuco

    09/13/2018, 5:46 PM
    For some reason switching from 1.2.60 to 1.2.61 and 1.2.70 is breaking my UI tests.
    :youtrack: 1
    g
    p
    • 3
    • 8
  • u

    Udit003

    09/14/2018, 6:40 AM
    Hello! , I am starting a new Activity by using
    startActivity(intent)
    and
    finish()
    , but my viewModel
    onCleared()
    method is not called . What is the reason. I am using koin for di. Appcompat library 'com.android.support😒upport-v4:27.1.1' .
    g
    u
    s
    • 4
    • 10
  • l

    LeoColman

    09/15/2018, 1:41 AM
    Is there anyway to customize TextInputLayout programatically?
    g
    • 2
    • 1
  • n

    Nizzle94

    09/15/2018, 11:00 AM
    I want to use Lambda expression but I am getting such error. Can anyone help ?
    k
    • 2
    • 2
  • s

    Sudhir Singh Khanger

    09/16/2018, 4:00 AM
    I am not sure what to do here. Should I migrate or cancel? I don't remember messing up with Kotlin compiler settings.
    d
    • 2
    • 5
  • s

    Sudhir Singh Khanger

    09/16/2018, 4:51 AM
    Should I uninstall Kotlin 1.2.70 version from Settings>Plugin and reinstall an older version?
    s
    • 2
    • 1
  • a

    Abbas

    09/17/2018, 12:38 AM
    Hello . Dear programmers, I’d be happy to help develop this library. Thank . https://github.com/dfmabbas/reactor
    d
    r
    g
    • 4
    • 6
  • s

    Slackbot

    09/17/2018, 6:25 AM
    This message was deleted.
    g
    n
    • 3
    • 3
  • a

    Ayokunle Paul

    09/17/2018, 12:34 PM
    Hey guys, I migrated my project to androidx and now I can’t access the FileUtils class. Has it been removed or am I missing something?
    g
    • 2
    • 1
  • p

    Paul Woitaschek

    09/17/2018, 2:43 PM
    Then it doesn't exist in your layout file
    m
    • 2
    • 1
  • d

    Daniele Segato

    09/18/2018, 5:07 PM
    I've stumbled into the first problem I had caused by kotlin.. "default" function do not work if a Java class extends them, this happened with Room database, the code below gives an error when I try to compile:
    error: MyDao_Impl is not abstract and does not override abstract method myInterfaceMethod(String) in MyDao
    If I write the same Dao in Java it compile with no issue:
    @Dao
    public interface TestDao {
        @Ignore
        default String myInterfaceMethod(String test) {
            return test;
        }
    }
    anyone know if there's a way to make it work? maybe some Annotation?
    -.kt
    • 1
    • 1
  • t

    temp_man

    09/19/2018, 8:47 PM
    Does anyone here have any BLE experience with Kotlin? I have hit a wall on something.
    n
    a
    l
    • 4
    • 3
  • p

    Paul Woitaschek

    09/19/2018, 8:59 PM
    How is kotlin related to android BLE?
    ☝️ 1
    👍 2
    s
    r
    • 3
    • 2
  • m

    memphis

    09/20/2018, 2:20 PM
    Hello guys, I’m using
    @IntDef
    annotation as below
    companion object {
            @Retention(AnnotationRetention.SOURCE)
            @IntDef(
                    TYPE_HEADER.toLong(),
                    TYPE_FOOTER.toLong()
            )
            annotation class AdapterItemType
    
            const val TYPE_HEADER = 0
            const val TYPE_FOOTER = 2
        }
    I noticed that values inside
    @IntDef
    must be of type
    Long
    and not
    Int
    .. But in compilation, I get this error :
    error: incompatible types: possible lossy conversion from long to int
    Any idea? 🙂
    b
    • 2
    • 1
  • p

    Paul Woitaschek

    09/20/2018, 2:33 PM
    For me it compiles without casting them to long @memphis
    m
    • 2
    • 12
  • l

    leosan

    09/21/2018, 9:15 AM
    I was looking into plaid source and they have this delegate for databinding https://github.com/nickbutcher/plaid/blob/757ee036c4eed46431982c1de5e6d0b57809fea2/core/src/main/java/io/plaidapp/core/util/delegates/ContentViewBindingDelegate.kt I’ve created mine like this, is there any performance or big difference between the two?
    inline fun <reified T : ViewDataBinding> FragmentActivity.contentView(@LayoutRes layoutRes: Int) = lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
        DataBindingUtil.setContentView<T>(this, layoutRes)
    }
    k
    • 2
    • 1
  • h

    HaSH

    09/21/2018, 7:01 PM
    Hey all, I'm trying to figure out what is causing this error:
    a
    • 2
    • 1
  • i

    Icaro Temponi

    09/22/2018, 10:28 PM
    Hi everyone, what are some good books on android using Kotlin ? I'm working as an android developer and really would like to learn as much as possible of this amazing language coupled with the android framework. Kotlin makes android development so fun 🙂
    a
    • 2
    • 1
  • p

    Paul Woitaschek

    09/23/2018, 1:26 PM
    Is it possible to remove the fact that kotlinx is annotating fragments with LayoutContainer?
    r
    h
    • 3
    • 4
Powered by Linen
Title
p

Paul Woitaschek

09/23/2018, 1:26 PM
Is it possible to remove the fact that kotlinx is annotating fragments with LayoutContainer?
r

rkeazor

09/23/2018, 1:40 PM
Can you clearify the question or show a code snippet
p

Paul Woitaschek

09/23/2018, 2:49 PM
Like here https://stackoverflow.com/questions/34485857/kotlin-synthetic-and-custom-layout-in-dialogfragment
r

rkeazor

09/23/2018, 3:13 PM
When are you using it. the thing about Kotlin synthetic extensions ,is that they have to be called when the view is created, so you can’t use them on ,on create view
h

hallvard

09/23/2018, 8:21 PM
"Removing facts" is difficult. You could try presenting some alternative facts instead. Seems to work in the US anyway. 🙂
😂 1
View count: 3