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
compose
  • t

    ti4n

    12/25/2022, 6:40 AM
    Do I have a way to achieve inlineTextContent in TextField?
  • k

    Karthick

    12/25/2022, 7:11 AM
    Why
    confirmStateChange
    not using the latest state. I want to disable state change while loading. My code is like this.
    val uiState = viewModel.uiState.value
    Logger.d(SNAP_TAG, "UISTATE $uiState")
    
    val bottomSheetState = rememberBottomSheetState(
         initialValue = BottomSheetValue.Expanded,
         confirmStateChange = {
               Logger.d(SNAP_TAG, "UISTATE $uiState")
               !(uiState is UiState.Loading)
         }
    )
    But
    confirmStateChange
    lambda always have uiState as Loading, even-though state changed to Success. My logs are like this
    UISTATE com.example.state.UiState$Loading@f06c50e
    UISTATE Success
    
    UISTATE com.example.state.UiState$Loading@f06c50e
    UISTATE com.example.state.UiState$Loading@f06c50e
    d
    j
    f
    • 4
    • 7
  • d

    Debdut Saha

    12/25/2022, 7:12 AM
    Hey everyone, anyone has idea about LookaheadLayout with lazy column. The usecase is to transform a outside view to a children of lazy layout ?
    d
    • 2
    • 1
  • c

    CLOVIS

    12/25/2022, 6:02 PM
    What do you mean it doesn't work? Copying the bottom code works fine for me
    k
    a
    • 3
    • 4
  • g

    Gonzalo Renedo

    12/26/2022, 3:39 PM
    hello good, I would like to be able to align the content of a bottom sheep with the sheep content, that is, that the sheep content is not placed above the content but below, and when I expand the sheetcontent, the content is collapsed
    k
    r
    d
    • 4
    • 12
  • g

    Gonzalo Renedo

    12/26/2022, 4:43 PM
    ?
  • f

    filipegoncalves

    12/26/2022, 7:25 PM
    Hello everyone, anyone knows how can i make a
    HorizontalPager
    be a “Circular/Infinite” list ? By “Circular/Infinite” I mean that in a list of 10 items, when I reach the end of the list`(index 9)` it would show me the first element
    (index 0)
    again right after Any ideas?
    e
    • 2
    • 4
  • u

    ursus

    12/26/2022, 10:12 PM
    I want to have a row of two equal width squares (and they fill the whole row width) The issue is then divided into composables like
    Square
    , then I think the squareness should be a internal detail of the Square composable (Modifier.aspectRatio) However, the width its supposed to have, should come from the parent, since Square to be generic, doesnt know how to be uses
  • n

    nuhkoca

    12/26/2022, 11:13 PM
    Hello, I am trying to create a baseline profile for our project but
    benchmark
    module throws the exception below when executing
    ./gradlew connectedBenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
    task
    symbol: class DeveloperSettingsModule
    error: ComponentProcessingStep was unable to process 'path.to.package.core.di.ApplicationComponent' because '<error>' could not be resolved.
    Can somebody please help me figure out what’s wrong with Dagger? I am confused.
    c
    • 2
    • 2
  • c

    chanjungskim

    12/27/2022, 2:04 AM
    Hello, I have a question about animating dialogs. in basic library, there's a dialog function. But it doesn't seem I can apply some animation when it opens. So, I created this function called
    animatedDialog
    . Is this normal way or does this have any problem or is there any better solution to solve this issue?
    fun NavGraphBuilder.animatedDialog(
        route: String,
        arguments: List<NamedNavArgument> = emptyList(),
        deepLinks: List<NavDeepLink> = emptyList(),
        enter: EnterTransition = fadeIn() + expandIn(),
        exit: ExitTransition = shrinkOut() + fadeOut(),
        dialogProperties: DialogProperties = DialogProperties(),
        content: @Composable (NavBackStackEntry) -> Unit
    ) {
        addDestination(
            Destination(
                provider[AnimatedDialogNavigator::class],
                enter = enter,
                exit = exit,
                dialogProperties,
                content
            ).apply {
                this.route = route
                arguments.forEach { (argumentName, argument) ->
                    addArgument(argumentName, argument)
                }
                deepLinks.forEach { deepLink ->
                    addDeepLink(deepLink)
                }
            }
        )
    }
  • c

    chanjungskim

    12/27/2022, 2:06 AM
    https://stackoverflow.com/questions/74925228/how-can-i-animate-dialog-in-jetpack-compose-navigation
    s
    i
    • 3
    • 11
  • y

    Yves Kalume

    12/27/2022, 8:40 AM
    Is there a way to set insets without putting
    android:windowSoftInputMode="adjustResize"
    in my Manifest file ? (i don’t want my layouts to be resized when the keyboard is on the screen but i just want my Textfield to be visible)
    e
    c
    • 3
    • 3
  • s

    Shakil Karim

    12/27/2022, 8:40 AM
    Is Shared element transition supported in Navigation Compose ?
    b
    i
    n
    • 4
    • 3
  • g

    Giang

    12/27/2022, 12:27 PM
    Hello, is Material3 safe to be used? I mean, the library version is in stable channel, but using Scaffold requires opting in for ExperimentalMaterial3Api 😅
    g
    c
    • 3
    • 4
  • j

    jossiwolf

    12/27/2022, 2:43 PM
    We merged a fix for this in the upcoming release - I'll link the issue tomorrow. You can try a snapshot build in the meantime
    y
    • 2
    • 3
  • c

    Colton Idle

    12/27/2022, 6:40 PM
    This sorta recent article also does a good job explaining why things are the way they are https://medium.com/androiddevelopers/fixing-font-padding-in-compose-text-768cd232425b
  • u

    ursus

    12/27/2022, 8:48 PM
    I want to draw a fake statusbar, so I use
    drawBehind { .. .drawRect … }
    but how do I get the height of statusbar? I see the
    statusBarPadding
    but that’s modifier. Is there a way to read the actual integer value?
  • s

    sindrenm

    12/27/2022, 8:57 PM
    Are there any plans to ship a non-lazy version of
    LazyVerticalGrid
    and
    LazyHorizontalGrid
    ? I could just roll with a
    Column
    of `Row`s, but I like the
    GridCells.Adaptive
    approach of determining how many items in each
    Row
    .
  • j

    Justin Tarnoff

    12/27/2022, 9:58 PM
    I'm using Jetpack Compose navigation in an app with multiple activities, each with their own separate nav graph (multiple activities is a requirement). My workflow is to navigate from Activity 0 -> Activity 1 -> Activity2 then navigate back to Activity 0 and clear the back stack. I can't find a way to clear the back stack when navigating back to Activity 0. Since I'm using NavGraphBuilder, I don't have direct access to the Intent used to launch the activity. Through
    ActivityNavigatorDestinationBuilder
    , I'm able to access the action, data, and dataPattern used to create the intent, but I don't see a way to let me set flags like
    FLAG_ACTIVITY_NEW_TASK
    or
    FLAG_ACTIVITY_CLEAR_TOP
    . How can I navigate back to Activity 0 and clear the back stack?
    i
    • 2
    • 7
  • u

    ursus

    12/27/2022, 11:04 PM
    How do I add two
    PaddingValues
    together?
    LazyColumn(
        contentPadding = WindowInsets.navigationBars.asPaddingValues() + PaddingValues(16.dp),
    I need to add navigationbar inset + my padding together
    g
    • 2
    • 2
  • t

    Tin Tran

    12/28/2022, 2:27 AM
    Maybe you can try
    animateContentSize
    in the LazyColumn
  • l

    louiscad

    12/28/2022, 5:18 AM
    Hello, does a Googler have write access to the issue template we see when going on https://goo.gle/compose-feedback? It could be updated improved in several ways, and I'd write suggestions if someone can take note and act.
  • l

    louiscad

    12/28/2022, 5:19 AM
    Hello, does a Googler have write access to the issue template we see when going on https://goo.gle/compose-feedback? It could be updated and improved in several ways, and I'd write suggestions if someone can take note and act.
    j
    • 2
    • 1
  • p

    Pardip

    12/28/2022, 8:53 AM
    :android-wave:Hello, I’m struggling with jetpack compose web view inside
    bottomSheet
    . Adding a
    verticalScroll(rememberScrollState())
    modifier to the WebView (
    AndroidView
    ) or parent composable inside BottomSheet causes some page contents/images to not load for unknown reasons. I also tried the accompanist web view inside the bottom sheet and obtained the same results (some page contents or images are not showing up). But when I don’t use BottomSheet, those pages/images appear. Is there a way to handle it?
  • i

    Issa

    12/28/2022, 9:46 AM
    Consider this composable nested layout: • LazyColumn(#1) ◦ Box (should not be a header) ◦ LazyColumn (#2) ▪︎ LazyRow ▪︎ Box Is there a way to scroll the LazyColumn #1 out of it’s bounds so that the LazyColumn #2 first item’s offset is positioned at (0dp, 40dp) from the screen’s top left origin? In Android leanback I used to use the WindowAlignement for that but I am wondering how can the same result be achieved using compose. Thanks
    k
    m
    • 3
    • 5
  • e

    eygraber

    12/28/2022, 11:52 AM
    Just got alerted by Renovatebot
    Update kotlin monorepo to v1.8.0
    When will compose support Kotlin 1.8.0 :trollface:
  • k

    KotlinLeaner

    12/28/2022, 3:16 PM
    Hi is anyone help me on #compose BOM?
    c
    • 2
    • 2
  • y

    Yariv Ziporin

    12/28/2022, 7:04 PM
    Hi guys, does anyone know if there's an easy way to use an outlinedtextfield with rounded corners?
    c
    k
    • 3
    • 3
  • i

    Issa

    12/28/2022, 10:22 PM
    I am trying to write a custom VerticalArragment for a lazyVerticalGrid where • items in the first line get a top padding of 10.dp • items in the seconds line get a top padding of 20.dp • and the rest will get a top padding of 5.dp
    object CustomVerticalArrangement : Arrangement.Vertical {
    
        override fun Density.arrange(totalSize: Int, sizes: IntArray, outPositions: IntArray) {
            var current = 0
            sizes.forEachIndexed { index, it ->
                when (index / 3) {
                    0 -> outPositions[index] = current + 10
                    1 -> outPositions[index] = current + 20
                    else -> outPositions[index] = current + 5
                }
                current += it
            }
        }
    }
    I pass it over later to my LazyVerticalGrid
    LazyVerticalGrid(
        modifier = Modifier.fillMaxSize(),
        columns = GridCells.Fixed(3),
        contentPadding = PaddingValues(start = 70.dp, end = 70.dp, top = 75.dp, bottom = 40.dp),
        // TODO: consider custom vertical arrangement
        verticalArrangement = CustomVerticalArrangement,
        horizontalArrangement = Arrangement.spacedBy(10.dp)
    ) { ... }
    The code is never called I believe or it’s jus that LazyGrid doesn’t consider it and use the default spacing
    0.dp
    (debugger breakpoint never reached BTW) Am I doing something wrong or this is a bug?
    • 1
    • 1
  • k

    Konyaco

    12/29/2022, 4:30 AM
    Hi! Is it possible to set the blur, offset and color of shadow? Will compose supports them officially?
    r
    • 2
    • 3
Powered by Linen
Title
k

Konyaco

12/29/2022, 4:30 AM
Hi! Is it possible to set the blur, offset and color of shadow? Will compose supports them officially?
r

romainguy

12/29/2022, 4:43 AM
Only elevation shadows are currently supported. There’s already a feature request open in the issue tracker for what you are describing.
https://issuetracker.google.com/issues/160665122
k

Konyaco

12/29/2022, 5:04 AM
Thank you👍
View count: 3