shikasd
06/26/2020, 11:58 AMaddChangesAppliedObserver
in composer on dev-14, but actually open for external listeners 🙂
The use case is that whenever changes are getting applied, they can result in multiple small updates. I wanted to batch them, so I could dispatch events more efficiently.estevanfick
06/26/2020, 12:23 PMSize
passing through a Modifier
?spierce7
06/26/2020, 1:15 PMhenrikhorbovyi
06/26/2020, 10:08 PMjava.lang.IllegalStateException: LayoutCoordinate operations are only valid when isAttached is true
?dimsuz
06/27/2020, 9:26 AMHanzhen
06/27/2020, 11:06 AMComposable
function in AS? I would like to see what compose compiler does for those functions.samueldple
06/27/2020, 4:01 PMScaffold
, the content starts underneath the topBar
but goes to the bottom of the viewport, even if there's a bottomBar
there. I noticed this because the VerticalScroller
I added wasn't scrolling due to the content only just going under the bottomBar
. Is this the correct behaviour, and if so should I be storing the measured height of the bottom bar to fit the main content inside the Scaffold
?Timo Drick
06/27/2020, 11:50 PMsegunfamisa
06/29/2020, 6:19 AMmutableStateOf()
replacement suggestions for @Model
However, when I use a sealed class hierarchy to model my state, e.g like I've done here (https://github.com/segunfamisa/android-zeitung/pull/17/files#diff-03a45e46e60aaa4e3efa4e4e6041dea3R11-R23), I get an exception during IR lowering. The line that stood out for me was: Caused by: java.lang.AssertionError: Object should have a primary constructor: ...
I'm wondering if this is a technical limitation worth filing as a FR or bug, or something I totally not should be doing?Miguel Coleto
06/29/2020, 4:05 PMandylamax
06/29/2020, 10:48 PM// 1st
(view as FrameLayout).setContent(Recomposer.current()) {
}
//2nd
(view as FrameLayout).setViewContent {
}
andylamax
06/30/2020, 1:10 AMchris
06/30/2020, 1:57 AM@Composable
Profile( username: String, name: String, location: String, activityTotals: List<ActivityTotals>? = null )
The activityTotals
come back afterwards. Since Profile
isn’t an object I can’t expose a property to update with the new value. Would I expose a state or pass in an observable or do something else?Brady Aiello
06/30/2020, 5:04 AMgpaligot
06/30/2020, 7:28 AMdev-08
to dev-14
(yea, a lot of changes x)) and see that you removed @Model
annotation. According to your changelog, you suggest to use state
or remember
delegate functions but when I see your commit in your git repository with this breaking change, I found @Stable
annotation with the exact same behavior as @Model
. Someone can tell me what is this annotation?Allan Wang
06/30/2020, 8:06 AMAllan Wang
06/30/2020, 9:23 AMimageResource
is “likely to be removed” due to synchronous loading, and results in an AIOOB exception
• The deferred loading pattern seems preferred, but does not seem to redraw once the icon loads.
What is the correct approach here for loading resource content?
Edit: I now realize there is a difference between imageResource
and vectorResource
, but the latter is also a transient APIvityokkv73
06/30/2020, 10:03 AMmolikto
06/30/2020, 12:01 PMcompose-desktop
can correctly draw something now (not sure if this happend recently, before it is blank for me), I tried to compile compose runtime to iOS but had some issues with cocoutine kotlin-native abi version (The abi versions don't match. Expected '[21]', found '22'
), after some struggling I give up because I am not actually very familar with MPP.andylamax
06/30/2020, 12:15 PMkotlin-multiplatfrom
support jetpack-compose compilation?Hanzhen
07/01/2020, 1:58 PMfunc
instead of class
to create composable elements? func
is lack of the capability of chain calls, for instance: Text("...").font().textColor()
.Joe Masilotti
07/01/2020, 7:14 PMAnkur Gupta
07/01/2020, 7:53 PMJulius Marozas
07/01/2020, 8:02 PMregisterForActivityResult
function in Compose?
In this section of the android documentation it says that you must always call registerForActivtyResult
in the same order in your Fragment/Activity. Can this be achieved in Compose?Guy Bieber
07/01/2020, 9:39 PMImage(
asset = imageFromResource(mResource!!, R.drawable.mutagent)
)
henrikhorbovyi
07/01/2020, 11:39 PMcompose
on a android module.
But the project can't find buildFeatures
🤔
A problem occurred evaluating project
> Could not find method buildFeatures() for arguments on extension 'android' of type com.android.build.gradle.LibraryExtension.
henrikhorbovyi
07/02/2020, 2:19 AMremember
inside an inline function? 🤔Adrian Blanco
07/02/2020, 1:21 PMdelay(1)
seems to make it work as intended, but feels extremely hacky. What would be the idiomatic solution for this?
val imageState = stateFor<ImageState, String>(imageUrl) { ImageState.Loading }
launchInComposition(imageUrl) {
delay(1)
imageState.value = loadImage(imageUrl, targetWidthPx, targetHeightPx)
}
Lilly
07/02/2020, 6:07 PMViewModel
properly. dev14 added a viewModel()
composable: Let’s say we need a ViewModel
instance in multiple composable functions. Should we explicit obtain the instance via viewModel()
in every composable function or should we obtain it once on top of the compose hierarchy and then pass it the way down?amar_1995
07/02/2020, 6:18 PMAndroidView
and trying to integrate legacy pagination library but I am getting this error
jetified-kotlin-stdlib-1.3.71.jar: Runtime JAR file has version 1.3 which is older than required for API version 1.4
amar_1995
07/02/2020, 6:18 PMAndroidView
and trying to integrate legacy pagination library but I am getting this error
jetified-kotlin-stdlib-1.3.71.jar: Runtime JAR file has version 1.3 which is older than required for API version 1.4
AndroidView(resId = R.layout.paginated_main) {
val myAdapter = MyAdapter()
myList.adapter = myAdapter
lifecycleScope.launch {
@OptIn(ExperimentalCoroutinesApi::class)
myModel.state.collectLatest { myAdapter.submitData(it) }
}
}
henrikhorbovyi
07/02/2020, 8:36 PMamar_1995
07/02/2020, 8:51 PMcompose-runtime
is using older version internally.
I tried including compose-runtime
package in gradle in legacy android code and then it also leads to same issue.henrikhorbovyi
07/02/2020, 9:02 PMamar_1995
07/02/2020, 9:23 PMhenrikhorbovyi
07/02/2020, 9:49 PMdev13
and it solvedamar_1995
07/02/2020, 10:07 PM'androidx.paging:paging-runtime-ktx:2.1.2'
and that resolves the issuehenrikhorbovyi
07/03/2020, 12:58 AM