Aaron Yoder
04/07/2021, 2:52 AMval stateVertical = rememberScrollState(0)
val stateHorizontal = rememberScrollState(0)
Box(modifier = Modifier.verticalScroll(stateVertical).padding(end = 12.dp, bottom = 12.dp).horizontalScroll(stateHorizontal)) {
Canvas(modifier = Modifier.size(width.dp, height.dp) {
drawIntoCanvas { canvas ->
// draw things
}
}
}
VerticalScrollbar(modifier = Modifier.fillMaxHeight(), adapter = rememberScrollbarAdapter(stateVertical))
HorizontalScrollbar(modifier = Modifier.fillMaxWidth().padding(end = 12.dp), adapter = rememberScrollbarAdapter(stateHorizontal))
I'm not sure if this is the proper way to implement a scrollable canvas, because while it does seem to scroll across the canvas fine, there don't appear to be any visual scrollbars, just empty space on the bottom and right sides of the global canvas, rather than relative to the window. The other issue I was having was that I was putting a pointerMoveFilter
modifier on the canvas modifier to get x, y coordinates in the canvas, which apparently isn't the proper way to do it because when adding scroll bars the coordinates of the top-left position are always 0, 0 regardless of where that actually might be on the canvas. I feel like I'm definitely misunderstanding something about scrollbars here. Are they only meant for scrolling through a list, and not across an image? How would I correctly implement it for a canvas, and is there a proper method of getting the relative-to-Canvas x, y coordinates?theapache64
04/07/2021, 9:07 AMKEY_PRESSED
(but getting KEY_RELEASED
) for the first key event. 🤔
Is this expected ?Colton Idle
04/07/2021, 11:39 AMHalil Ozercan
04/07/2021, 10:03 PMThe os does not support: 'Taskbar.setIconImage'
error. What could be the problem?theapache64
04/07/2021, 10:48 PMfillMaxSize
,the onKeyEvent
not getting called. Is this expected?jim
04/08/2021, 8:32 AMFelipe Gaiad
04/09/2021, 1:39 AMColton Idle
04/09/2021, 8:34 AMHyia
04/09/2021, 9:31 AM@Preview
now?Colton Idle
04/09/2021, 10:16 AMdependencies {
implementation(project(":common"))
implementation("androidx.activity:activity-compose:1.3.0-alpha03")
}
Which makes sense. android module depends on common module. and also activity compose lib. cool.
But then common has
val androidMain by getting {
dependencies {
api("androidx.appcompat:appcompat:1.2.0")
api("androidx.core:core-ktx:1.3.1")
}
}
That seems... wrong? Should appcompat and core be directly in android build file?
As an experiment I just commented out those /common android deps and placed them in /android build file and everything works. again... leaving me confused as to why have the android deps in two places?v79
04/09/2021, 8:30 PMvar something = remember { mutableStateOf<MyClass>(_* can't construct here because it's currently null *_) }
?Hyia
04/10/2021, 3:23 AMtheapache64
04/10/2021, 7:44 AMdrawImage
(Canvas
) with "pixelated" output?theapache64
04/10/2021, 10:45 AMCanvas
to draw beyond visible area, would it draw that OR skip it?
For example. let's say my window size is 100x100, and I ask Canvas
to drawImage
at 1000x1000
, so would it draw that OR ignore that call since its outside the window size?theapache64
04/10/2021, 11:32 AMIntOffset
or IntSize
(object creation) to outside the DrawScope
? I mean, will there any notable performance difference if I move these measurement classes outside the DrawScope
drawImage(
image = R.graphics.brickPng,
dstOffset = IntOffset(floorBrick.x, floorBrick.y), // or should I call `floorBrick.intOffset?` (where intOffset created only one time)
)
Bahaa Kallas
04/10/2021, 4:26 PMProcess 'command 'C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\jbr\bin\java.exe'' finished with non-zero exit value 1
and a log file is generated inside the module directory which contains some crap which is not quite readable (for me)
I have IntelliJ IDEA 2020.3.3 (Ultimate Edition) Build #IU-203.7717.56 installed and I am working on Windows 10 machine
Any ideas whether this is a local issue or the project produced by the wizard is not configured correctly
Thanks in advanceColton Idle
04/11/2021, 2:24 AMv79
04/11/2021, 11:45 AMgbaldeck
04/12/2021, 12:56 AMmoz
04/12/2021, 2:56 AMIcyrockton
04/12/2021, 4:16 AMtheapache64
04/12/2021, 8:29 AMspierce7
04/13/2021, 1:07 AMolonho
04/13/2021, 9:37 AM0.4.0-build181
, as due to upstream changes it isn’t usablespierce7
04/13/2021, 4:13 PMDeklan Webster
04/13/2021, 6:43 PMDeklan Webster
04/13/2021, 6:43 PMKirill Grouchnikov
04/14/2021, 5:48 AMArslan Armanuly
04/14/2021, 11:51 AMKirill Grouchnikov
04/14/2021, 2:24 PMKirill Grouchnikov
04/14/2021, 2:24 PMolonho
04/14/2021, 2:53 PMalexey.tsvetkov
04/14/2021, 5:56 PM1.0.0-alpha01
artifacts were published unwillingly, because of a change in the mainline. The 1.0.0-alpha01
artifacts are deleted now.Kirill Grouchnikov
04/14/2021, 6:13 PMhfhbd
04/19/2021, 4:40 PMalexey.tsvetkov
04/20/2021, 7:04 AMKirill Grouchnikov
04/20/2021, 1:17 PM0.4.0-preview-annotation-build55
as the latesthfhbd
04/20/2021, 1:21 PM56
build? 😄
<version>0.4.0-preview-annotation-build56</version>
<version>0.4.0-preview-annotation-build55</version>
<version>0.4.0-preview-annotation-build53</version>alexey.tsvetkov
04/20/2021, 1:23 PM0.4.0-preview-annotation-*
versions are removed.0.4.0-idea-preview-build57
0.4.0-*
versions should be deleted nowhfhbd
04/20/2021, 3:49 PMupdater | INFO <job_111337542> Latest version is 0.4.0-build184
🎉