Luka
07/22/2021, 9:06 AMiamthevoid
07/22/2021, 9:07 AMTextField
🙂 ) Why don’t you left any possibility to change strokeCap
for CircularProgressIndicator
? I can change strokeWidth
[thread], but somewhy i cannot change capSanendak
07/22/2021, 9:10 AMPiotr Prus
07/22/2021, 9:36 AMiamthevoid
07/22/2021, 9:42 AMBoolean?
) to post new root in NavHostController. I use it to unauthorize user (when error 401 received from server, for example) or authorize user when it enter credentials.
In app code it works perfect. But when i go through app with compose UI tests i am getting exception when user just authorized. Something like You can perform this action (post new root in NavController) only in main thread
. When i dive into LaunchedEffect
i found that it uses coroutines context from current composer [thread]. But for ui tests this current composer returns TestCoroutinesContext
that use Dispatchers.Default
instead of Dispatchers.Main
. It leads that side effects crashes the app, if trying to access UI thread operations.
How must i to act in this situations? Use somehow MainDispatcher directly in code (it is far from obvious)? Looks like there will be good approach to add to user the possibility to change composer dispatcher for UI testsKefas
07/22/2021, 11:10 AMMaterialTheme {
CompositionLocalProvider(
LocalContentAlpha provides ContentAlpha.high
) {
Surface(color = MaterialTheme.colors.primary) {
LocalContentAlpha.current // 0.87 (LowContrastAlpha)
ContentAlpha.high // 1.0 (HighContrastAlpha)
}
}
}
Halil Ozercan
07/22/2021, 12:14 PMcomposeView.draw(canvas)
is called. All graphicsLayer modifications like offset
, scale
, rotation
are disregarded.
So my question is; is there a way to enable graphicsLayer while drawing a View
onto a Canvas?Anton Popov
07/22/2021, 12:38 PMshadowElevation
(only for shadows), translationX
, translationY
SrSouza
07/22/2021, 12:53 PMColton Idle
07/22/2021, 1:07 PMjulioromano
07/22/2021, 1:24 PMnavigation-compose 2.4.0-alpha05
? There must have been some behavior changes because my navigation logic now leads to infinite loops which didn’t happen with alpha04.Daniel Burnhan
07/22/2021, 1:36 PMclass MyViewModel(model: Model) {
val userLoggedInFlow = model.usernameFlow.map { it != null } // returnes if there is a username
}
@Composable
fun myView(viewModel: MyViewModel){
val state = viewModel.userLoggedInFlow.asLiveData().observeAsState()
if(state.value != null){
//Show stuff here
}
else {
//navigate to the login screen
}
}
alorma
07/22/2021, 6:18 PMText
) is going to take more than a single line?Landry Norris
07/22/2021, 7:57 PMDarren Lambert
07/22/2021, 8:20 PMclass MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colors.background) {
Greeting("Android")
}
}
}
}
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
@Preview(showBackground = true,name="Text Preview")
@Composable
fun DefaultPreview() {
Greeting("Android")
}
Message of the error :
Attach Msg Error.txt
:/Sergey Y.
07/22/2021, 8:30 PMView#drawingCache
we had with legacy View
system). And I didn't understand why, until now.
Now I am going to raise this issue too. 😄
What I'm interested in:
(see attached images 🧵)
The question:
Is it possible to capture the underlying layers behind the widget in order to manipulate the pixels later?
Note:
It is not always possible to wrap every set of composable widgets in an AndroidView and use the rendering cache in the "old" way.
Is it planned to provide such functionallity with future versions of Compose(1.1
, 1.2
,...)?
And is it technically possible at all with Compose?
Thanks.Libor Bicanovsky
07/22/2021, 9:22 PMColton Idle
07/23/2021, 2:25 AMMohamed Ibrahim
07/23/2021, 3:16 AMAndroid Studio Bumblebee | 2021.1.1 Canary 3
, requires uninstalling and installing app so updates got reflected on the testing device. clicking instant run doesn’t always reflect all the changes which make it harder to debug.Nathan Castlehow
07/23/2021, 4:59 AMJeff
07/23/2021, 6:13 AMTin Tran
07/23/2021, 6:28 AMnavigation-compose:2.4.0-alpha05
my view model init {}
is called continuously. Does anyone having the same issue?
I’m using hilt-navigation-compose:1.0.0-alpha03
Dominaezzz
07/23/2021, 7:48 AMAnimatable
or updateTransition
, during the same composition? When I update the state or call snapTo
, the update happens in the next frame or so.ms
07/23/2021, 7:50 AMAndroid Studio Bumblebee | 2021.1.1 Canary 4
LOGS in 🧵Jeff
07/23/2021, 9:07 AMjava.lang.ClassCastException: androidx.navigation.NavGraph cannot be cast to androidx.navigation.compose.ComposeNavigator$Destination
This happens when I try to navigate
navController.navigate(Screen.Authentication.route) {
popUpTo(Screen.Main.route) {
inclusive = true
}
launchSingleTop = true
}
Worked fine with 04dbaelz
07/23/2021, 9:36 AMModifier.border()
that overdraw each other (link and code in the thread). Gave an explanation why it's this way, but after I read it again I'm unsure if it's correct and I have second thoughts. Can someone shed some light into the topic?Tin Tran
07/23/2021, 9:37 AMLazyRow
when I call animateScrollToItem
back to a short item seems like it doesn’t animate the scroll at all. Sample code in 🧵iamthevoid
07/23/2021, 10:11 AMthe picture from internets▾
Tgo1014
07/23/2021, 11:09 AMiamthevoid
07/23/2021, 11:48 AMLocalTextInputService
? If i press number (“2” for example) i got (twice!) onKeyEvent
action, but when i press comma
i get onEditCommands
inside compose framework. Funny thing is that i can not intercept numbers pressing at all, but want that too much )iamthevoid
07/23/2021, 11:48 AMLocalTextInputService
? If i press number (“2” for example) i got (twice!) onKeyEvent
action, but when i press comma
i get onEditCommands
inside compose framework. Funny thing is that i can not intercept numbers pressing at all, but want that too much )comma
case