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

    kufear

    09/20/2017, 11:31 AM
    Hi guys, somebody encountered with problem on compiling in project with kotlin? I have message in gradle console: e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class android.support.v4.app.FragmentActivity, unresolved supertypes: android.support.v4.app.ActivityCompatApi23.RequestPermissionsRequestCodeValidator But some time ago it compiled successful.
    s
    r
    3 replies · 3 participants
  • j

    jw

    09/20/2017, 2:35 PM
    jre8 has constructs which use APIs only available from Java 8 onward which limits your compatibility more than jre7 which uses APIs only available from Java 7 onward
    a
    4 replies · 2 participants
  • r

    Ricardo

    09/20/2017, 3:04 PM
    Hi guys. I'm starting a new Kotlin project and wondering which dependency injection library should I use. I've used Dagger2 with Java in the past, but it doesn't seem to fit that well with Kotlin. Any suggestions?
    r
    2 replies · 2 participants
  • k

    kevinmost

    09/20/2017, 3:07 PM
    most people don't like the
    internal lateinit var
    syntax they frequently see in Dagger 2, to which I say... you should use constructor injection anyway 🙂
    b
    1 reply · 2 participants
  • p

    Paul Woitaschek

    09/21/2017, 8:23 AM
    My problem with dagger is that it breaks with kapt so often so I have to do a full rebuild
    j
    l
    3 replies · 3 participants
  • j

    joshdaquino

    09/22/2017, 3:03 AM
    lol.
    a
    2 replies · 2 participants
  • t

    themarketka

    09/22/2017, 7:55 PM
    build time went from ~3 minutes to 50 seconds cold, ~10 seconds hot with 1.1.50 😳 ❤️
    ⏩ 2
    🎉 2
    😮 3
    s
    2 replies · 2 participants
  • r

    ra1nmak3r

    09/22/2017, 9:55 PM
    Does
    data class
    have problem with huge data? I mean, I'm using a
    data class
    in a
    RecyclerView
    and this class has some fields (all of them are primitive types) and when applying some animations when the user click in one of the items in the list these animations does not works properly. But if I use a
    class
    instead of a
    data class
    , everything works fine and all animations are applied.
    a
    4 replies · 2 participants
  • s

    Shahjahan

    09/24/2017, 2:11 PM
    What about Active Android?
    t
    g
    +1
    3 replies · 4 participants
  • j

    jw

    09/24/2017, 2:12 PM
    that's an ORM. Definitely not. ORMs are bad.
    😆 3
    e
    3 replies · 2 participants
  • j

    jw

    09/24/2017, 3:52 PM
    you can't just grab the buffer and clone it because it might be empty
    c
    3 replies · 2 participants
  • j

    Jorge Castillo

    09/24/2017, 4:02 PM
    One rapid question here. I’m trying to do synthetic import for a layout included in a different gradle module (a dependency of the app module)
    d
    r
    6 replies · 3 participants
  • j

    Jorge Castillo

    09/24/2017, 4:02 PM
    any clues ? is it possible ? @jw?
    g
    1 reply · 2 participants
  • r

    Regan Russell

    09/24/2017, 10:37 PM
    I am attempt to observe on java.lang.Void but my 204 responses are still coming back with null pointer exceptions: https://gist.github.com/pymblesoftware/30a26505af653a495f95983ad1528958 How do I handle 204s..?
    r
    r
    +2
    10 replies · 5 participants
  • m

    myanmarking

    09/25/2017, 10:11 AM
    is
    _
    not valid package name anymore?
    d
    1 reply · 2 participants
  • a

    Ashok

    09/25/2017, 2:33 PM
    How can we pass two high order functions to method or constructor like adapter (items:List<string>, click:(Item) -> unit, long click:(item) -> unit)
    a
    1 reply · 2 participants
  • c

    codeslubber

    09/25/2017, 4:57 PM
    one of the most compelling uses of Kotlin is for unit tests, but after spending hours on getting Spek to work in a vanilla project generated from AS3, I need to move on, found an article about using JUnit where the tests are written in K, is that a good approach? is there a better source than this? https://fernandocejas.com/2017/02/03/android-testing-with-kotlin/
    d
    k
    +1
    29 replies · 4 participants
  • k

    kz

    09/26/2017, 2:49 PM
    I think it's more about tagging him directly. If he only cares about Jake's opinion, why not DM him directly?
    d
    1 reply · 2 participants
  • m

    martin.petrulak

    09/27/2017, 9:58 AM
    @sqia09 you can do something like :
    listOf("one","two","three").sortedWith(compareBy<String> { it.length }.thenByDescending { it.first() }.thenBy { it.last() })
    s
    1 reply · 2 participants
  • e

    Edwin Ramirez Ventura

    09/27/2017, 1:38 PM
    Sorry, I was searching for something
    a
    3 replies · 2 participants
  • a

    Ashok

    09/27/2017, 3:29 PM
    val adapter = ShopListAdapter(this@Fragment.context) {
                        val selectedItem = adapter.selected
                        compareItems(selectedItem, it)
                    }
    
    
    class ShopListAdapter(context:Context, onSelect:(String) ->Unit) : RecyclerView.Adapter<VH> {
    …..
    view.onClick…(…) {
       onSelect(view.tag)
    }
    ...
    }
    m
    1 reply · 2 participants
  • a

    Ashok

    09/27/2017, 3:30 PM
    my question is how can i use adapter variable inside high order function
    e
    1 reply · 2 participants
  • m

    miha-x64

    09/27/2017, 5:12 PM
    About @Parcelize. If I understood correctly, Kotlin compiler can implement Parcelable in existing class. But what about parcelable wrapper, e. g.
    class ParcelSomething(val something: Something) : Parcelable {...
    , where
    Something
    is not parcelable itself?
    d
    4 replies · 2 participants
  • b

    budioktaviyan

    09/27/2017, 8:10 PM
    guys, anyone knows how to implement junit 5 in android without using any other 3rd party plugin ?
    :stackoverflow: 6
    a
    r
    6 replies · 3 participants
  • s

    sodiqoladeni

    09/28/2017, 7:12 AM
    Hi guys, please I'm new to professional programming have been introduced to it high school but I personally want to learn something meaningful on my own and be good at it. Can someone direct to free online tutorial that teaches Kotlin for android development from beginners scratch to the top, ranges from multiscreen, networking, database and expert level etc. Or someone that has videos or PDF that can share with me. I really want to learn please kindly help.
    m
    s
    +4
    16 replies · 7 participants
  • e

    Edwin Ramirez Ventura

    09/28/2017, 2:05 PM
    I'm trying to implement Dagger2 with Kotlin but I'm getting the following error: A @Module may not contain both non-static @Provides methods and abstract @Binds or @Multibinds declarations
    m
    r
    17 replies · 3 participants
  • e

    Edwin Ramirez Ventura

    09/28/2017, 6:19 PM
    I'm using Dagger2 and I have a class with a constructor's injection and a method injection but only the constructor is been called.
    d
    3 replies · 2 participants
  • l

    lpirro

    09/29/2017, 9:00 AM
    @gildor Anyway, aside from ButterKnife, I can use kotlin synthetic for ViewHolders?
    g
    1 reply · 2 participants
  • m

    mugur

    09/29/2017, 7:47 PM
    Hello, anyone ran into an issue similar to this: https://stackoverflow.com/questions/46486395/java-lang-noclassdeffounderror-com-example-api-retrofit-authenticationintercept?
    :stackoverflow: 6
    a
    6 replies · 2 participants
  • b

    blakelee

    09/30/2017, 8:14 PM
    Does recyclerview have a wrap around method? I want it to loop back to the first element when it reaches the last element. I was looking at fastadapter and I'm not sure what the feature is called
    :stackoverflow: 6
    a
    2 replies · 2 participants
Powered by Linen
Title
b

blakelee

09/30/2017, 8:14 PM
Does recyclerview have a wrap around method? I want it to loop back to the first element when it reaches the last element. I was looking at fastadapter and I'm not sure what the feature is called
:stackoverflow: 6
a

agrosner

09/30/2017, 11:07 PM
Flexbox? https://github.com/google/flexbox-layout
b

blakelee

10/01/2017, 5:52 AM
I ended up writing my own. Thanks for the suggestion though
View count: 3