Mehdi Haghgoo
09/13/2020, 5:00 AMArpan Sarkar
09/13/2020, 5:28 AMrepeatable{}
the keyframe delay is not working as expected.Mehdi Haghgoo
09/13/2020, 8:27 AMMehmet Peker
09/13/2020, 9:57 AMJohn O'Reilly
09/13/2020, 11:14 AMlaunchInComposition
as shown here to call suspend function....what's recommended way to show progress indicator (like CircularProgressIndicator
) until that function completes?
@Composable
fun MainLayout(sdk: SpaceXSDK) {
var launches by remember { mutableStateOf<List<RocketLaunch>>(emptyList()) }
launchInComposition {
launches = sdk.getLaunches(false)
}
LazyColumnFor(items = launches) { launch ->
LaunchView(launch)
}
}
Saiedmomen
09/13/2020, 12:20 PMState
in ViewModels?sasikanth
09/13/2020, 1:52 PMremember
with mutableStateOf
as a property delegate, but I am getting this error.
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
Here is the usage
var selectedItem by remember { mutableStateOf(0) }
Currently I am using AS 4.2 Canary 10 with Compose Alpha 02. Am I doing something wrong or is this an issue?Sourabh Rawat
09/13/2020, 2:01 PMBaseTextField
.Archie
09/13/2020, 2:28 PMLeland Richardson [G]
09/13/2020, 7:48 PMhttps://www.youtube.com/watch?v=WNkIMx3Mr9o▾
Mohamed Elfiky
09/13/2020, 7:59 PMKamilH
09/14/2020, 9:36 AMChipGroup
? Some custom Layout
or some combination of Column
and Row
?Alex Barcelo
09/14/2020, 11:46 AMstart
project, finished
doesn’t even do anything. I’m building the codelab project from AS 4.2 Canary 10, Compose alpha-02 and running it on a Google Pixel 3a.manueldidonna
09/14/2020, 12:47 PMArchie
09/14/2020, 12:58 PM*
* @sample androidx.compose.material.samples.ButtonSample
*
* If you need to add an icon just put it inside the [content] slot together with a spacing
* and a text:
*
* @sample androidx.compose.material.samples.ButtonWithIconSample
Daniele B
09/14/2020, 3:53 PMambientOf
in this way, which is basically the same way you would use @EnvironmentObject
in SwiftUI:
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1592352556316500
@Composable
fun foo(appState: StateFlow<ChannelState>) {
val currState by appState.collectAsState()
Providers(CurrAppState provides currState) {
// Content that should see currState
}
}
as a kind of “dependency injection”, which “saves” an object in the environment, so that it’s possible to call it down the tree without having it passed all the time as a parameter.
But I didn’t understand the explanation of @Adam Powell and @Zach Klippenstein (he/him) [MOD] why ambientOf
should not be used in this use case, and what is the way to use it instead.Archie
09/14/2020, 4:32 PMCrossfade
composable work? How does it it able to fade in and fade out the Composables? Why are there two Stack
inside Crossfade
? What exactly does invalidate
do? and so on and so forth.. I would like to create a custom transition of my own but i struggle to understand how it works. Any guide on where I should start so I could understand these concepts better?mattinger
09/14/2020, 6:28 PMisSystemInDarkTheme()
function and decides whether to return my light or dark colors instance.spierce7
09/15/2020, 2:10 AMColton Idle
09/15/2020, 2:41 AMTextField(value = "first", onValueChange = { s: String -> })
Rodri Represa
09/15/2020, 10:45 AMval viewModel: LoginViewModel by viewModel()
Se7eN
09/15/2020, 1:21 PMLazyColumnFor
that displays 20 items. The items consist of an image and some text. When displaying 20 items with each image of size 128kb, it lags like hell. Is this a bug or am I missing something? Also, it works totally fine when displaying only text.Henning B
09/15/2020, 4:16 PMmap
operator doesn't work for me though. I am getting the error:
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: ...
.fastMap
works though.
Why is this happening? Should I report this?
Link to codelab: https://developer.android.com/codelabs/jetpack-compose-layouts#5Neal Sanche
09/15/2020, 6:20 PMAlejandro Rios
09/16/2020, 2:25 AMMigrating to Jetpack Compose
codelab then on the Testing
tab it mentions that you can use findByText
to validate a composable String the strange thing is that function doesn't appearNat Strangerweather
09/16/2020, 4:04 PMzoha131
09/16/2020, 4:23 PMtcracknell
09/16/2020, 5:07 PM3bdoelnaggar
09/16/2020, 5:25 PMdagomni
09/16/2020, 7:09 PMdagomni
09/16/2020, 7:09 PMIan Lake
09/16/2020, 7:21 PMJavier
09/16/2020, 8:43 PMIan Lake
09/16/2020, 10:09 PMandroidx.compose.navigation
artifact group at the momentJavier
09/17/2020, 9:42 AMui/androidx/compose/navigation
, I have to click "next page" a few minutes, and in the url I can't put the page number too because it is using a token
• I didn't see samples with args, so I guess they are not supported at this momentIan Lake
09/17/2020, 1:56 PMAlexander Karkossa
09/17/2020, 3:29 PMIan Lake
09/17/2020, 4:15 PMAlexander Karkossa
09/17/2020, 7:54 PMSergey Y.
09/17/2020, 8:02 PMIan Lake
09/17/2020, 8:02 PMAlexander Karkossa
09/17/2020, 8:04 PMIan Lake
09/17/2020, 8:22 PMAlexander Karkossa
09/17/2020, 8:26 PMJavier
09/17/2020, 8:31 PMIan Lake
09/17/2020, 8:33 PMdefaultViewModelProviderFactory
and Compose's viewModel function, then it'll certainly use Hilt's factoryAlexander Karkossa
09/17/2020, 8:35 PMIan Lake
09/17/2020, 9:28 PMAlexander Karkossa
09/17/2020, 9:44 PMIan Lake
09/17/2020, 9:51 PMmichaelevans
12/29/2020, 11:14 PMAlexander Karkossa
12/30/2020, 6:49 AMHilt
`ViewModel`s in NavHost
, but I haven’t checked for a long time to see if it works without that workaround in the meantime.
class ViewModel(
private val repository: Repository,
) : ViewModel() {
}
class ViewModelFactory(private val context: Context) : ViewModelProvider.Factory {
@EntryPoint
@InstallIn(ApplicationComponent::class)
interface ViewModelProviderEntryPoint {
fun repository(): Repository
}
@Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
val provider = EntryPointAccessors.fromApplication(context, ViewModelProviderEntryPoint::class.java)
return ViewModel(
repository = provider.repository(),
) as T
}
}
@Composable
fun ComposeView(
modifier: Modifier = Modifier
) {
val viewModel: ViewModel = viewModel(factory = ViewModelFactory(AmbientContext.current))
}