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

    Stefan Oltmann

    03/14/2022, 12:37 PM
    Is it correct that
    .pointerInput(Unit) {}
    can only take one argument? I have one call to
    detectTransformGestures
    , but if I add another thing like
    detectTapGestures(
        onPress = {
            println("ON PRESS")
        }
    )
    or
    detectDragGestures
    before that it's never called. Only the first of these are called and all others are ignored. I don't know how I'm supposed to combine a drag handler with a pinch-zoom detection... The "pan" does not help me, because I don't know when the drag is ended (the finger lifted).
    ✅ 1
    a
    • 2
    • 27
  • d

    Daniele Segato

    03/14/2022, 2:56 PM
    Any plan in restoring Data Table now that Compose has stabilized? it has been removed long ago https://android-review.googlesource.com/c/platform/frameworks/support/+/1276360
    👍 2
    n
    a
    • 3
    • 8
  • b

    Benjamin Deroche

    03/14/2022, 4:07 PM
    I've seen a good practice of Jetpack Compose that is to group Composable methods inside Objects, but never managed to use it because of one problem.
    object ButtonActionBar {   
        @Composable
        fun RowScope.CancelButton(onClick: () -> Unit) {
            Button(
                modifier = Modifier.weight(2f),
                onClick = onClick
            ) {
                Text(
                    text = "Cancel"
                )
            }
        }
    }
    
    @Composable
    fun RowScope.PublishButton(onClick: () -> Unit) {
        Button(
            modifier = Modifier.weight(2f),
            onClick = onClick
        ) {
            Text(
                text = "Publish"
            )
        }
    }
    Row(
       modifier = Modifier.height(48.dp)
    ) {
       SessionActionBar.CancelButton() {}
       PublishButton {}
    }
    In this example the
    PublishButton
    work fine but not the
    CancelButton
    , if I remove the
    RowScope
    it kinda work (but then I don't have access to
    weight
    modifier) or need to move it outside of
    ButtonActionBar
    object as the
    PublishButton
    j
    n
    +2
    • 5
    • 17
  • j

    Jan Skrasek

    03/14/2022, 4:25 PM
    I have a high-level TextField component:
    fun OurTextField(modifier: Modifier) {
       Column(modifier) {
         Label()
         TextField()
         ErrorMessage()
       }
    }
    So when our devs use it in UI tests, they pass testTag that is in the Column's modifier. However, that breaks the bahavior, especially for setting a value to text field. (There is no SetText on Column). What is the best solution for those high-level components: • merge tree on column (something which will work nicely for SetText, worse for other texts; alternatively reexpose them - Text for input, new semantics for Label and Error) • exposing tag names which ui tests may reused to specify "child" of the OurTextField • do nothing and let ui tests to use onChildAt(1) to get access to TextField • some other approach?
    i
    a
    • 3
    • 3
  • d

    danieeh

    03/14/2022, 4:57 PM
    Hi there!! I’m facing one issue when testing one screen that I just migrated to compose.. and I’ve created this small playground project to reduce the scope and to point out the specific issue hoping for some help!! Issue is about adding
    verticalScroll
    behaviour to a Column.. compose needs be idle in order to proceed.. but when verticalScroll is in place, test is stuck doing something:
    2022-03-14 17:52:52.078 16637-16651/com.compose.playground I/pose.playgroun: Background concurrent copying GC freed 633159(22MB) AllocSpace objects, 1(20KB) LOS objects, 49% free, 4055KB/8110KB, paused 371us total 798.298ms
    https://github.com/danimontoya/compose-playground/commit/74bf12fc5c9df9118602ab3a1989cef618f6b005 I would like to keep the veticalScroll behaviour and the tests on that screen not stuck and green, as it works for phones (only happens on tablets == master/detail fragments).. any pointer whats going on?? thanks in advance 🙂
    • 1
    • 1
  • t

    Thomas Dougherty

    03/14/2022, 10:27 PM
    Hey everyone, I have a question about compose ripples. I have a Radio button in a row, and when the row or button is selected, I want the ripple to show in the entire row. Currently I have that working, except when they click on the radio button itself, when they do that it shows the circular ripple around the radio button. I can disable that ripple with a dummy interaction source, but then I get no row ripple. How can I make it so when they click the radio button it ripples for the whole row?
    ✅ 1
    t
    • 2
    • 3
  • b

    Bradleycorn

    03/14/2022, 11:23 PM
    I’m using Navigation Compose and some of the destinations in my graph use
    AndroidViewBinding
    to load a
    FragmentContainerView
    with “legacy” fragments (until we can get them converted to compose):
    composable(route="my-screen") { AndroidViewBinding(MyFragmentBinding::inflate) }
    What I’m struggling with is … when some action is taken in the Fragment (like say a button is clicked), I need to navigate to a new destination (route). How can I do that?
    i
    • 2
    • 7
  • j

    james

    03/15/2022, 12:45 AM
    When wrapping a
    WebView
    in an
    AndroidView
    for use in a compose app, I have need of methods on the webview instance outside of the wrapped component for example a refresh button that calls
    webView.loadUrl(…)
    . How do I expose this to composable functions using the
    WebView
    component? Unsure how to expose this from the wrapped component
    t
    c
    • 3
    • 7
  • y

    Yoshio Schermer

    03/15/2022, 8:35 AM
    In VSCode / Flutter, there is a really nice “Wrap with new Widget” feature where you don’t need to select your whole Widget, but just have your cursor on the Widget to be wrapped. Does this exist for Android Studio / Compose too? Now, I have to select the Composable and all of its contents and then wrap it. It would be nice to skip selecting everything every time.
    :stackoverflow: 1
    j
    c
    • 3
    • 3
  • k

    K Merle

    03/15/2022, 9:46 AM
    I have`ExposedDropdownMenuBox` and nested
    OutlinedTextField
    . Initial
    ExposedDropdownMenu
    contains nested
    TextField
    . I am unable to open keyboard when nested
    TextField
    is focused. How do I enable keyboard on nested
    TextField
    ?
    • 1
    • 1
  • a

    Alejandro Moya

    03/15/2022, 1:30 PM
    Hey Everyone 😄, I have a question about getting xml resources,
    fun dimensionResource(@DimenRes id: Int): Dp
    returns DP dimensions, but there’s no SP version of it, is there a way to return the SP xml dimensions?
    a
    m
    • 3
    • 18
  • t

    Tobias Gronbach

    03/15/2022, 1:35 PM
    Hi! I have a LazyColumn and want to change the screen-background-color to that of the item-background at the center-position. It's working fine I'm not sure if I do the calculations at the right place because as soon as I add those calculations I'm triggering infinite recomposition thats why I think I do something wrong. Code-Example in Thread.
    a
    • 2
    • 4
  • e

    Eric Martori

    03/15/2022, 1:45 PM
    Hello everyone! I've been researching about how to change/remove the dimming/scrim in the Dialog composable. I've found some outdated solutions in the chat history and this ticket in the issue tracker: https://issuetracker.google.com/issues/159900354 but I do not know how to proceed with this. Is there a way to do it without re-implementing the whole thing? If re-implementation is needed what exactly needs to be changed? I cannot find in the Dialog Composable code where the dimming effect is being applied.
    c
    l
    • 3
    • 5
  • n

    Nikos Kermanidis

    03/15/2022, 2:48 PM
    Hi! I am working on a stock trading application and we are currently migrating our real-time updated lists to compose. I have a
    LazyColumn
    witch displays the stocks and each stock is real-time updated through web-socket events. I am testing the LazyColumn performance (using a release build) and it’s dropping frames. The performance is not as good as it was with the RecyclerView (with DiffUtil). I also used the Recomposition highlighter from the Google play team and verified that my LazyColumn is constantly recomposing. I will include the code in the thread. Any ideas on how to improve the performance?
    👍 3
    d
    s
    +5
    • 8
    • 84
  • n

    Niklas Bolwede

    03/15/2022, 9:11 PM
    How can i solve this exception with my navGraphs on orientation change? I do not get this error when top/starting navGraph.
    java.lang.IllegalStateException: Restoring the Navigation back stack failed: destination -1666506032 cannot be found from the current destination Destination(0xcf551cdb) route=SettingsNavGraph
    • 1
    • 7
  • s

    Suser

    03/16/2022, 5:01 AM
    Is there any way to see visually when a recomposition occurs just for checking that you’re not doing unnecessary recomposition? some sort of inspector or debug option?
    t
    h
    • 3
    • 3
  • j

    Jan Skrasek

    03/16/2022, 8:26 AM
    Why one `TextField()`'s boolean argument is named
    isError
    and another without
    is
    -
    readOnly
    ?
    🤔 1
    😁 1
    z
    s
    • 3
    • 5
  • s

    sindrenm

    03/16/2022, 11:22 AM
    Is there a way to scope an AndroidX View Model to a composable, or does that even make sense? AFAICT, when injecting through `viewModel()`/`hiltViewModel()`, the VM is scoped to a
    ViewModelStoreOwner
    , which might be a nav back stack entry or a fragment or whatnot, but not an “actual” composable, if that makes sense. However, if I have a list of similar items and I want each of them to have their own instance of a same-type View Model, then I'm at a loss on how to achieve this. Any suggestions?
    c
    z
    a
    • 4
    • 9
  • p

    Prasad Mhapankar

    03/16/2022, 11:42 AM
    Can anyone please share any references regarding compose navigation in dynamic feature modules?
    i
    • 2
    • 1
  • t

    Tobias Gronbach

    03/16/2022, 12:47 PM
    I have a question regarding surface. When I wrap a parent-composable in a surface it applies my theme standard values (like color e.g.). But when I place a child-composable inside parent composable those values are not adopted in the child. I also need to wrap the child in surface. Is this expected behaviour or how should I deal with it?
    f
    • 2
    • 23
  • d

    dimsuz

    03/16/2022, 1:45 PM
    Is there a way to report a value change in the example below assuming I have no way to modify
    State
    ?
    class State(
      val value by mutableStateOf(false)
    )
    
    fun Component(state: State, reportValueChange: (Boolean) -> Unit)) {
      val v = state.value 
      // how to call reportValueChange(v) here
      // **only** when "v" changes?
    }
    I have tried
    snapshotFlow { state.value }.collect(::reportValueChange)
    but it emits nothing on value changes
    a
    z
    c
    • 4
    • 15
  • y

    Yoshio Schermer

    03/16/2022, 1:56 PM
    Is there something in Material 3, to combine Material Extensions with Dark mode. In Material 2, it was like this:
    val ColorScheme.link: Color
        get() = if(isLight) colorX else colorY
    But, this doesn’t work with M3?
    l
    • 2
    • 1
  • d

    dimsuz

    03/16/2022, 2:33 PM
    Some composables (swipeable, BottomSheet*, HorizontalPager, LazyColumn etc) have some internal state which they manage by themselves and even when this state is allowed to be hoisted the need for detecting some events based on state changes arises. I find myself wishing to write
    if (prevState = 1 && state = 0) onEvent(...)
    . Sometimes this leads me to discovery that I think about the state wrong and I refactor, but sometimes I can't and I ask myself what's the best pattern to detect some thresholds in state changes? Examples: • ListColumn has just scrolled past 100 visible item, how to report this to analytics? • Composable with
    swipeable
    modifier has just finished settling after swipe. How to observe this change from
    swipeableState.isAnimationRunning
    from
    true
    to
    false
    and report it to some other component?
    z
    • 2
    • 6
  • m

    mertceyhan

    03/16/2022, 4:04 PM
    Hello all! I want to keep my toolbar always on the top and navigate screens under of it in fully compose project. I couldn’t find a way for this, do you have idea? Normally it can be done like this in XML way:
    <?xml version="1.0" encoding="utf-8"?>
    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="<http://schemas.android.com/apk/res/android>"
        xmlns:app="<http://schemas.android.com/apk/res-auto>"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    
        <androidx.fragment.app.FragmentContainerView
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:defaultNavHost="true"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/toolbar"
            app:navGraph="@navigation/nav_graph" />
    
    </androidx.constraintlayout.widget.ConstraintLayout>
    e
    • 2
    • 8
  • c

    chansek

    03/16/2022, 6:30 PM
    Getting an exception when using
    bottomSheet
    from accompanist:
    java.lang.IllegalArgumentException: The target value must have an associated anchor.
        at androidx.compose.material.SwipeableState$snapTo$$inlined$collect$1.emit(Collect.kt:136)
        at kotlinx.coroutines.flow.FlowKt__LimitKt.emitAbort$FlowKt__LimitKt(Limit.kt:73)
        at kotlinx.coroutines.flow.FlowKt__LimitKt.access$emitAbort$FlowKt__LimitKt(Limit.kt:1)
        at kotlinx.coroutines.flow.FlowKt__LimitKt$take$2$1.emit(Limit.kt:63)
        at androidx.compose.material.SwipeableState$special$$inlined$filter$1$2.emit(Collect.kt:137)
        at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15)
        at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15)
        at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:77)
        at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:59)
        at androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$snapshotFlow$1.invokeSuspend(SnapshotFlow.kt:134)
        at androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$snapshotFlow$1.invoke(Unknown Source:8)
        at androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$snapshotFlow$1.invoke(Unknown Source:4)
        at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
        at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:227)
        at androidx.compose.material.SwipeableState$special$$inlined$filter$1.collect(SafeCollector.common.kt:114)
        at kotlinx.coroutines.flow.FlowKt__LimitKt$take$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:115)
        at androidx.compose.material.SwipeableState.snapTo(Swipeable.kt:943)
        at com.google.accompanist.navigation.material.SheetContentHostKt.internalHide(SheetContentHost.kt:188)
        at com.google.accompanist.navigation.material.SheetContentHostKt.access$internalHide(SheetContentHost.kt:1)
        at com.google.accompanist.navigation.material.SheetContentHostKt$SheetContentHost$2$2$1.invokeSuspend(SheetContentHost.kt:145)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8633)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    How should I fix this up? As per this SO question, the fix should be by mentioning the minHeight as 1 dp: https://stackoverflow.com/questions/68623965/jetpack-compose-modalbottomsheetlayout-throws-java-lang-illegalargumentexception But this solution doesn't work for me.
    j
    • 2
    • 1
  • h

    hfhbd

    03/16/2022, 7:38 PM
    How can you fill a row with two buttons: First button should take the max width, but there should be another minified button.
    @Composable
    fun InfoButton(infoTest: String, button: @Composable (Modifier) -> Unit) {
        Row(modifier = Modifier.fillMaxWidth()) {
            Info(infoTest)
            button(Modifier.fillMaxWidth())
        }
    }
    This code renders the icon at the left side, I want to show them on the right side
    p
    c
    • 3
    • 9
  • a

    Aleon Q

    03/16/2022, 7:42 PM
    Hi folks 👋, This question is regarding benchmarking composables in Jetpack Compose. What I am interested in as a starter is to measure how long does it take to render a composable on a screen for the first time it is composed and on recompositions. What I have tried so far: • Android benchmarking samples from the official repo here. • Looked at other initiatives that folks in the community have come up with like this repo here. • I took suggestion from @romainguy on this thread , @Leland Richardson [G] on this thread and went about trying out how can I utilize some of the ideas there. There are many good starting points for benchmarking in the compose repo. I found something that seems very relevant in tests for
    Text
    composable in TextBasicBenchmark that uses ComposeBenchmarkRule. It uses a few methods that benchmarks the first composition, measure, draw, layout. The problem I am running into is what how would I be able to use that ComposeBenchmarkRule? I couldnt find any dependencies/library that exposes this class. Is this currently available for use in any jetpack compose testing libraries? How should I go about it? Thanks for creating this space and allowing the questions to be asked. Much appreciated 🙌
    b
    c
    • 3
    • 8
  • t

    tavoeh

    03/16/2022, 11:39 PM
    Hi folks. Is there any composable or any custom solution to handle text line-break and hyphenation? Any plans to support hyphenation in compose in the future?
    👍 1
    z
    s
    • 3
    • 10
  • a

    allan.conda

    03/17/2022, 6:05 AM
    About Text: Is it expected that the app will handle all focus manually for Keyboard actions such as
    onNext
    to
    Focus.DOWN
    for example, or will it be handled by Compose? • Software Keyboard Next, Enter • Hardware Keyboard Tab, Shift+Tab, Enter
    c
    • 2
    • 4
  • n

    Nurseyit Tursunkulov

    03/17/2022, 7:02 AM
    I have problem when testing the Dialog im Compose, can anyone help? https://stackoverflow.com/questions/71508178/compose-can-not-test-dialog
    :stackoverflow: 3
    b
    • 2
    • 1
Powered by Linen
Title
n

Nurseyit Tursunkulov

03/17/2022, 7:02 AM
I have problem when testing the Dialog im Compose, can anyone help? https://stackoverflow.com/questions/71508178/compose-can-not-test-dialog
:stackoverflow: 3
b

brabo-hi

03/17/2022, 9:14 AM
I believe compose cannot preview dialog in android studio?
View count: 4