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

    amar_1995

    07/12/2020, 7:45 AM
    I have implementated a infinite scroller which loads data at the end of page. And it is working as expected. But I also want to keep observing all loaded data for any changes from local database. I don't know how to do this. Any suggestion ?
    n
    t
    +1
    19 replies · 4 participants
  • n

    nglauber

    07/12/2020, 3:12 PM
    I’m applying the same shape for both background and border, but they’re looking incorrect on the corners. Is it a bug?
    val shape = RoundedCornerShape(8.dp)
        Column(modifier = Modifier.fillMaxSize()) {
            Text(
                text = "Text 1",
                modifier = Modifier.fillMaxWidth()
                    .padding(16.dp)
                    .drawShadow(2.dp, shape)
                    .drawBorder(2.dp, MaterialTheme.colors.secondary, shape)
                    .drawBackground(MaterialTheme.colors.primary, shape)
                    .padding(16.dp)
            )
        }
    👀 4
    l
    n
    +1
    9 replies · 4 participants
  • s

    Socheat KHAUV

    07/12/2020, 3:18 PM
    any example animation code for loading image ?
    t
    n
    2 replies · 3 participants
  • v

    V Badalyan

    07/13/2020, 12:02 AM
    Can anyone compile and public
    org.jetbrains.kotlin.kotlin-compiler-embeddable-1.3.70-dev-withExperimentalGoogleExtensions-20200424
    with kottlin
    1.4-M2
    and
    M3
    version" ??? • clean
    1.4-M2
    from get brains don't compile
    Caused by: java.lang.IllegalArgumentException: Call resolver must be non-null	at androidx.compose.plugins.kotlin.ComposeCallResolutionInterceptorExtension.interceptCandidates(ComposeCallResolutionInterceptorExtension.kt:189)
    • setting
    kotlinCompilerVersion = "1.3.70-dev-withExperimentalGoogleExtensions-20200424" don't work because i use IR and Progressive mode
    cause error becouse i use IR and progressiveMode
    Class 'com.cisystems.ssmp.arm_vmb2.controlles.workerUtils.CardsUpdateWorkerUtils' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
    j
    1 reply · 2 participants
  • d

    doubov

    07/13/2020, 12:05 AM
    👋 Question with regard to getting match_parent behavior for inner Composables. For example:
    @Composable
    fun Greeting(name: String) {
        val state = state { TextFieldValue("Hello $name") }
    
        Row(modifier = Modifier.fillMaxWidth() + Modifier.wrapContentHeight()) {
            Box(modifier = Modifier.width(32.dp) + Modifier.fillMaxHeight(), backgroundColor = Color.Yellow)
            Column(modifier = Modifier.weight(1f)) {
                TextField(
                    modifier = Modifier.fillMaxWidth() + Modifier.wrapContentHeight(),
                    value = state.value,
                    onValueChange = {
                        state.value = it
                    }
                )
                Text(
                    text = "TextField text: ${state.value.text}",
                    modifier = Modifier.padding(vertical = 8.dp) + Modifier.fillMaxWidth() + Modifier.wrapContentHeight()
                )
                Text(text = "Finish", modifier = Modifier.fillMaxWidth() + Modifier.wrapContentHeight())
            }
            Box(modifier = Modifier.width(32.dp), backgroundColor = Color.Yellow)
        }
    }
    Produces in my opinion, unexpected layout:
    v
    p
    +2
    27 replies · 5 participants
  • m

    Madhava

    07/13/2020, 12:46 AM
    Got a weird one with OutlinedTextField: I cant seem to change the keyboardType, the imeAction or get notified onImeActionPerformed. Also, to get code using onImeActionPerformed to compile I have to do this trick: This compiles:
    fun onImeActionPerformed(action: ImeAction, keyboard: SoftwareKeyboardController?): Unit {
        Log.v("conditions", "ime pressed $action $keyboard")
    }
    OutlinedTextField(
        value = searchState.value,
        onValueChange = { it: String ->
            Log.v("conditions", "search bar $it")
            searchState.value = it
        },
        activeColor = primaryColor,
        inactiveColor = primaryColor,
        label = { Text("Search") },
        onFocusChange = { it: Boolean ->
            Log.v("conditions", "focus changed $it")
        },
        imeAction = ImeAction.Search,
        keyboardType = KeyboardType.Ascii,
        onImeActionPerformed = { action, kb -> onImeActionPerformed(action, kb) },
        modifier = Modifier.fillMaxWidth()
    )
    This does not:
    fun onImeActionPerformed(action: ImeAction, keyboard: SoftwareKeyboardController?): Unit {
        Log.v("conditions", "ime pressed $action $keyboard")
    }
    OutlinedTextField(
        value = searchState.value,
        onValueChange = { it: String ->
            Log.v("conditions", "search bar $it")
            searchState.value = it
        },
        activeColor = primaryColor,
        inactiveColor = primaryColor,
        label = { Text("Search") },
        onFocusChange = { it: Boolean ->
            Log.v("conditions", "focus changed $it")
        },
        imeAction = ImeAction.Done,
        keyboardType = KeyboardType.Ascii,
        onImeActionPerformed = onImeActionPerformed,
        modifier = Modifier.fillMaxWidth()
    )
    Error:
    None of the following functions can be called with the arguments supplied:
    public fun OutlinedTextField(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, label: () -> Unit, modifier: Modifier = ..., textStyle: TextStyle = ..., placeholder: (() -> Unit)? = ..., leadingIcon: (() -> Unit)? = ..., trailingIcon: (() -> Unit)? = ..., isErrorValue: Boolean = ..., visualTransformation: VisualTransformation = ..., keyboardType: KeyboardType = ..., imeAction: ImeAction = ..., onImeActionPerformed: (ImeAction, SoftwareKeyboardController?) -> Unit = ..., onFocusChange: (Boolean) -> Unit = ..., onTextInputStarted: (SoftwareKeyboardController) -> Unit = ..., activeColor: Color = ..., inactiveColor: Color = ..., errorColor: Color = ...): Unit defined in androidx.ui.material
    public fun OutlinedTextField(value: String, onValueChange: (String) -> Unit, label: () -> Unit, modifier: Modifier = ..., textStyle: TextStyle = ..., placeholder: (() -> Unit)? = ..., leadingIcon: (() -> Unit)? = ..., trailingIcon: (() -> Unit)? = ..., isErrorValue: Boolean = ..., visualTransformation: VisualTransformation = ..., keyboardType: KeyboardType = ..., imeAction: ImeAction = ..., onImeActionPerformed: (ImeAction, SoftwareKeyboardController?) -> Unit = ..., onFocusChange: (Boolean) -> Unit = ..., onTextInputStarted: (SoftwareKeyboardController) -> Unit = ..., activeColor: Color = ..., inactiveColor: Color = ..., errorColor: Color = ...): Unit defined in androidx.ui.material
    v
    z
    14 replies · 3 participants
  • m

    Madhava

    07/13/2020, 2:41 AM
    Does anyone know how to disable androidx.ui.foundation.Text from being selected? I don't see any mention or properties anywhere talking about say "Disabling selection"
    👍 1
    v
    8 replies · 2 participants
  • a

    Alejandro Rios

    07/13/2020, 11:58 AM
    Hi guys, does anyone has an example on how animate a
    LinearProgressIndicator
    ?, by animate i mean to fill the progress to certain value, thanks!
    t
    m
    4 replies · 3 participants
  • b

    bohregard

    07/13/2020, 1:04 PM
    Does the LazyColumnItems have anything similar to recyclerview’s snaphelper?
    a
    1 reply · 2 participants
  • j

    Joshua McWilliams

    07/13/2020, 2:25 PM
    I am attempting to migrate an existing fragment in MVVM to use compose to render the view, we are currently injecting the viewModel into the Fragment via Dagger, anytime I build I get the following Kapt Exception:
    Execution failed for task ‘:app:kaptDebugKotlin’.
    > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
       > java.lang.reflect.InvocationTargetException (no error message)
    Any ideas how to get Dagger to place nice with Compose? Fragment Code:
    class HomeFragment : Fragment() {
    
       @Inject
       lateinit var viewModelFactory: ViewModelFactory
       private val vm: HomeViewModel by viewModels { viewModelFactory }
    
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            AndroidSupportInjection.inject(this)
        }
    
        override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
            val fragmentView = inflater.inflate(R.layout.compose_container, container, false)
    
            (fragmentView as ViewGroup).setContent {
                LetsComposeTheme {
                    HomeTabContent()
                }
            }
            return fragmentView
        }
    }
    
    @Composable
    fun HomeTabContent() {
        VerticalScroller {
              drawSectionCard(createSections())
        }
    }
    c
    a
    +1
    5 replies · 4 participants
  • j

    Julius Marozas

    07/13/2020, 4:56 PM
    Hi, quick question. I have a
    LinearProgressIndicator
    below an app bar. Can I hide the progress indicator without affecting the content below it? I am looking for something like
    View.INVISIBLE
    (and not
    View.GONE
    ).
    a
    z
    +1
    10 replies · 4 participants
  • h

    Halil Ozercan

    07/13/2020, 9:11 PM
    Hello everyone, is there currently a suggested way of handling navigation in compose? Especially stacked navigation where the bottom view is expected to remain as it is in case user navigates back(kind of like using
    add
    in fragment transactions).
    ➕ 1
    z
    a
    +3
    10 replies · 6 participants
  • a

    Alejandro Rios

    07/13/2020, 10:29 PM
    This might be a noob question, i have a
    Scaffold
    which has a
    bodyContent
    with a
    Box
    and a list inside and it scrolls ok, then, i added a
    bottomBar
    but now i cant see the bottom of the list, do you know if there's a way to avoid this? Thanks
    z
    m
    +2
    8 replies · 5 participants
  • m

    Madhava

    07/14/2020, 1:06 AM
    @Zach Klippenstein (he/him) [MOD] I tried to get your compose-backstack to work with dev14 but there are some changes I don't understand: https://github.com/madhavajay/compose-backstack/commit/bfbb56643a514b6943554ef306cb1c14b4b25791 Any chance you could help me understand what I need to fix to get this working and PR?
    z
    15 replies · 2 participants
  • m

    Madhava

    07/14/2020, 3:00 AM
    I am trying to get a MapView going but I think I am misunderstanding which classes to use with AndroidView and how they work exactly. For maps, it seems like all the examples bind a MapView and a GoogleMap instance to an activity? I don't know how I can construct a MapView and connect it to a GoogleMap object in this AndroidView type pattern. Any help would be greatly appreciated. 🙂
    AndroidView(
        modifier = Modifier.fillMaxWidth().fillMaxHeight(),
        view = MapComponent(ctx, options)
    )
    
    // the getMapAsync never runs
    private fun MapComponent(ctx: Context, options: GoogleMapOptions) = MapView(ctx, options).apply {
        val result = ctx.checkCallingPermission(Manifest.permission.ACCESS_FINE_LOCATION)
        Log.i("MapView", "got permission check value: $result")
    
        val builder = LatLngBounds.Builder()
        val cameraUpdate = CameraUpdateFactory.newLatLngBounds(builder.build(), 0)
    
        getMapAsync {
            Log.i("MapView", "Does this run?")
            it.uiSettings.isMyLocationButtonEnabled = true
            it.isMyLocationEnabled = true
            it.mapType = MAP_TYPE_NORMAL
        }
    }
    
    // if i try it this way, I don't see how to get a view from a fragment
    private fun MapComponent(ctx: Context, options: GoogleMapOptions) = SupportMapFragment.newInstance(options).getMapAsync { 
        
    }
    m
    m
    4 replies · 3 participants
  • s

    Socheat KHAUV

    07/14/2020, 7:38 AM
    Any crud example with sqlite ?
    f
    c
    3 replies · 3 participants
  • j

    Julius Marozas

    07/14/2020, 10:11 AM
    I am a bit confused about drawing polylines on
    Canvas
    . I see that the
    DrawScope.drawPath
    function accepts
    Path
    as a parameter. However, I also found a quite convenient path builder function
    PathData
    which returns
    List<PathNode>
    . Can I somehow pass that list of path nodes to
    DrawScope.drawPath
    , i.e., construct a
    Path
    from
    List<PathNode>
    ?
    a
    3 replies · 2 participants
  • s

    Socheat KHAUV

    07/14/2020, 10:29 AM
    Any ConstraintLayout example with ConstraintSet2 ?
    s
    2 replies · 2 participants
  • g

    Griffin.Park

    07/14/2020, 1:22 PM
    Hi all, I'm working on adding Twilio video chat to a project utilizing Compose, and I'm getting a strange compiler-level error from one of the Twilio components. Has anyone attempted this yet, or seen this error before?
    java.lang.IllegalArgumentException: Unhandled intrinsic in ExpressionCodegen: FUN IR_EXTERNAL_DECLARATION_STUB name:<get-primaryVideoView> visibility:public modality:FINAL <> ($receiver:android.app.Activity) returnType:com.twilio.video.VideoView?
    I haven't called the .xml file that this function is located, but this appears to be a separate activity from my main that's causing the error. Do I need to somehow refactor this into my main activity?
    a
    3 replies · 2 participants
  • a

    Alejandro Rios

    07/14/2020, 2:28 PM
    Hello, this is another noob question(maybe), let's say that i have a
    @Composable
    items, if i want to launch a
    Toast
    , how can i get the
    context
    in order to show the
    Toast
    ?
    🍞 1
    h
    1 reply · 2 participants
  • j

    Julius Marozas

    07/14/2020, 3:59 PM
    I've been reading the source code of Compose and found that in the
    rxjava2
    package the
    subscribeAsState
    function calls
    asState
    and it uses the
    onPreCommit
    hook. Why would the
    onCommit
    hook not work there? I don't really understand the use case of
    onPreCommit
    .
    a
    6 replies · 2 participants
  • b

    Brett Best

    07/14/2020, 4:02 PM
    I’m interested in this as well, is it possible to add an additional property to MaterialTheme e.g. Tertiary, Quaternary? https://kotlinlang.slack.com/archives/CJLTWPH7S/p1594707721231600
    m
    7 replies · 2 participants
  • n

    nglauber

    07/14/2020, 5:59 PM
    Dumb question of the day: Do I have to do something special to see the preview of my composable in the documentation? I mean this:
    /**
     * My Component
     *
     * @sample com.example.tempcompose.SimplePreview
     */
    @Composable
    fun MyComposable() { ... }
    
    @Preview
    @Composable
    fun SimplePreview() {
        MyComposable()
    }
    When I hit Cmd+Space I can see the sample code, but not the preview…
    v
    b
    +3
    12 replies · 6 participants
  • h

    Halil Ozercan

    07/14/2020, 10:41 PM
    I came across a possible bug related to
    IconButton
    and
    Icon
    . I'm developing a VideoPlayer fully written in Compose and wanted to add on-screen play/pause button. These icons need to be differentiable on video, so that I chose to use white for icon colors and draw shadow around them. Code looks something like this
    IconButton(
        onClick = {
            mediaPlayer.toggle()
            playButtonUiState = mediaPlayer.isPlaying
        }
    ) {
        Icon(
            asset = if (playButtonUiState) Icons.Filled.Pause else Icons.Filled.PlayArrow,
            modifier = Modifier.drawShadow(elevation = 2.dp)
        )
    }
    Without shadow, everything seems like to work. State changes and icon is updated when clicked on the button. However, when I add shadow as in the example, icon stops changing. Functionality works but icon gets fixed to
    Pause
    . Is there something wrong with my code or is this might be a bug?
    t
    c
    +1
    7 replies · 4 participants
  • p

    pajatopmr

    07/15/2020, 4:39 AM
    One of the first things I notice in my journey into the land of Compose (sample apps like Jetnews) is that there are two types of theme files, one legacy type referenced from the manifest file and one new type referenced as code files (e.g. Jetnewssample/app/src/main/java/com/example/jetnews/ui/theme/*.kt). My guess is that the legacy type will go away eventually to be replaced by the code file approach. Would this be a good guess? If not, what is the rational for having both approaches?
    a
    t
    +1
    8 replies · 4 participants
  • l

    Loboda Deni

    07/15/2020, 8:56 AM
    Hi. Is it possible to use this technology together with mvvm architecture?
    t
    11 replies · 2 participants
  • t

    Timo Drick

    07/15/2020, 11:34 AM
    Just implemented a basic transition navigation "framework" in about 200 lines of code. It supports enter/exit transitions defined by a Modifier. So it is easy to define simple transitions. (Already defined are: fadein, fadeout, crossfade, slidein, slideout, roll right/left) For me again this shows that compose is amazing. But get the transition system working in an efficient way was very hard. I used the code from the Crossfade composable as base. And it works now fine but for me little bit of magic. Because i needed to make sure that during the transition animation the content composable is not recomposed. Implementation is here: https://gitlab.com/timod/compose-playground/-/blob/master/app/src/main/java/de/appsonair/compose/Navigation.kt https://gitlab.com/timod/compose-playground/-/blob/master/app/src/main/java/de/appsonair/compose/Transition.kt And a demo how to use is in the MainActivit.kt file.
    device-2020-07-15-132622.webm
    👍 9
    :yes: 1
    💯 4
    z
    9 replies · 2 participants
  • c

    cb

    07/15/2020, 12:02 PM
    Nice! I'm implemented something this week, by extending
    Crossfade
    and allowing you to pass in a `TransitionDefinition`: https://gist.github.com/chrisbanes/c4d199a34366a4e13594f5f98d6e8620
    👍 2
    t
    3 replies · 2 participants
  • j

    Julius Marozas

    07/15/2020, 1:34 PM
    I have noticed that there's no persistent bottom sheet composable. Are there any plans to implement it?
    m
    4 replies · 2 participants
  • h

    henrikhorbovyi

    07/15/2020, 3:53 PM
    is
    @GenerateView
    annotation still available? 🤔
    v
    r
    +3
    11 replies · 6 participants
Powered by Linen
Title
h

henrikhorbovyi

07/15/2020, 3:53 PM
is
@GenerateView
annotation still available? 🤔
v

Vinay Gaba

07/15/2020, 4:08 PM
Afaik, it is not.
h

henrikhorbovyi

07/15/2020, 4:18 PM
😞
is there no idea to bring it back? Just for compatibility
r

romainguy

07/15/2020, 4:27 PM
It is something we want to have
👍 3
l

Leland Richardson [G]

07/15/2020, 4:48 PM
To make the annotation work how we want it to is difficult so we haven't released one yet. It will be possible to wrap composables as a view no matter what though, it just might not be a one liner
👍 3
h

henrikhorbovyi

07/15/2020, 5:27 PM
Oh! Got it
Thank you guys
p

Patrick Yin

08/18/2020, 12:30 AM
Is there any alternative solution at the moment? Or need to wait until
@GenerateView
is available?
➕ 2
a

Adam Powell

08/18/2020, 12:46 AM
AbstractComposeView
exposes a single
@Composable abstract fun Content()
, or
ComposeView
has a
setContent(content: @Composable () -> Unit)
method
@GenerateView
, when we get the opportunity to add it, will likely just generate a subclass of
AbstractComposeView
and add xml inflation in the constructor and
mutableStateOf
-backed properties
p

Patrick Yin

08/18/2020, 6:30 PM
The
ComposeView
is a good solution. didn’t find it out from doc and source code before you point it out. It works well. thanks @Adam Powell
👍 1
View count: 3