Cacato86
05/05/2021, 12:32 PMportrait - landscape
/ mobiles - tablet
The typical example with List-Detail (Navigation on phone, same screen in Tablet)Colton Idle
05/05/2021, 1:35 PMRoman Polach
05/05/2021, 4:07 PMtad
05/05/2021, 5:54 PMste
05/05/2021, 6:24 PM@Composable
fun Element(state: ElementState, content: @Composable ElementScope.() -> Unit) { ... }
class ElementState {}
@Composable
fun rememberElementState(): ElementState { ... }
class ElementScope {}
I was wondering why it is preferred against the version in the thread?
The guidelines do not mention it.Cicero
05/05/2021, 10:26 PMrobnik
05/06/2021, 2:57 AMe: This version (1.0.0-beta06) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5.0 which is not known to be compatible. Please fix your configuration (orbut don't say I didn't warn you!).`suppressKotlinVersionCompatibilityCheck
Tlaster
05/06/2021, 3:13 AMJustin Yue
05/06/2021, 3:25 AMGaurav Gangwar
05/06/2021, 6:18 AMjulioromano
05/06/2021, 6:49 AMcrossfade
and/or Accompanist’s fadeIn
?Tlaster
05/06/2021, 8:28 AMjava.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap
after upgrade to beta06 with accompanist 0.9.0, full stacktrace in threadadauguet
05/06/2021, 9:31 AMSurface(elevation = 5.dp, shape = CircleShape, modifier = Modifier.size(200.dp)) {}
But I do not see any shadow with this code:
Surface(elevation = 5.dp, shape = CircleShape, modifier = Modifier.size(200.dp)) {
GlideImage(
data = contact.avatarURL ?: "",
contentDescription = "",
)
}
What am I missing?Piotr
05/06/2021, 9:36 AMlouiscad
05/06/2021, 12:17 PMNthily
05/06/2021, 12:47 PMAndré Thiele
05/06/2021, 12:57 PMColton Idle
05/06/2021, 1:11 PMlouiscad
05/06/2021, 1:56 PMComposeView
from Android Studio? It complains about missing ViewTreeLifecycleOwner
, and ViewTressSavedStateRegistryOwner
😕
Also, does it mean it's impossible to have a compose view outisde of an Activity? I'm thinking about the few WindowManager
use cases.Slackbot
05/06/2021, 1:58 PMSlackbot
05/06/2021, 2:04 PMZhelyazko Atanasov
05/06/2021, 2:07 PMOneButton
with a single method in it (no classes or objects):
@Composable
fun OneButton(
modifier: Modifier = Modifier
...
If I try to call it from my other project, Android Studio does not recognize the function.
Then I decided to experiment and created a dummy Kotlin class with a single @Composable
method in it. Published the .aar to Maven Local and used it in the other project. I created an instance of the dummy class and successfully called the @Composable
function. What am I missing - my setup is more or less the same as in Accompanist (I'm not using Metalava and/or API file), I'm using the same Gradle plugin for publishing the artefacts... Any idea what may be wrong?Geert
05/06/2021, 2:53 PMArchie
05/06/2021, 5:07 PMnglauber
05/06/2021, 7:16 PMMahmudul Hasan Shohag
05/06/2021, 10:55 PMLazyColumn
. For ScrollState
we can use the scroll.value
to get the scroll position/offset. But with LazyListState
, we only have initialFirstVisibleItemScrollOffset
, which give offset for per item. So how can I create the same kind of collapsible effect with LazyColumn
?Justin Yue
05/07/2021, 12:07 AMAdrian Tappe
05/07/2021, 9:11 AMLazyColumn
within a ComposeView
within… a `CoordinatorLayout`: The Behaviors (FAB moving out of sight while scrolling e.g.) of the CoordinatorLayout
seem to not work.
How can the scrolling be propagated?Cicero
05/07/2021, 11:27 AMMarcin Środa
05/07/2021, 12:57 PMMarcin Środa
05/07/2021, 12:57 PMPrinting with useUnmergedTree = 'true'
Node #1 at (l=0.0, t=210.0, r=1080.0, b=762.0)px
|-Node #2 at (l=32.0, t=273.0, r=1048.0, b=415.0)px
| Actions = [OnClick]
| MergeDescendants = 'true'
| |-Node #3 at (l=174.0, t=291.0, r=365.0, b=348.0)px
| | Text = 'Channel 1'
| | Actions = [GetTextLayoutResult]
| |-Node #5 at (l=174.0, t=348.0, r=387.0, b=397.0)px
| Text = 'Description 1'
| Actions = [GetTextLayoutResult]
|-Node #7 at (l=32.0, t=415.0, r=1048.0, b=557.0)px
| Actions = [OnClick]
| MergeDescendants = 'true'
| |-Node #8 at (l=174.0, t=433.0, r=365.0, b=490.0)px
| | Text = 'Channel 2'
| | Actions = [GetTextLayoutResult]
| |-Node #10 at (l=174.0, t=490.0, r=387.0, b=539.0)px
| Text = 'Description 2'
| Actions = [GetTextLayoutResult]
|-Node #12 at (l=32.0, t=557.0, r=1048.0, b=699.0)px
Actions = [OnClick]
MergeDescendants = 'true'
|-Node #13 at (l=174.0, t=575.0, r=365.0, b=632.0)px
| Text = 'Channel 3'
| Actions = [GetTextLayoutResult]
|-Node #15 at (l=174.0, t=632.0, r=387.0, b=681.0)px
Text = 'Description 3'
Actions = [GetTextLayoutResult]
composeTestRule.onNodeWithText("Channel 1").assertExists()
returns
Reason: Expected exactly '1' node but could not find any node that satisfies: (Text = 'Channel 1' (ignoreCase: true))
useUnmergedTree = true