Status Update
Comments
lb...@gmail.com <lb...@gmail.com>
am...@google.com <am...@google.com>
jg...@google.com <jg...@google.com>
jl...@google.com <jl...@google.com> #2
Thanks! Over to Nader to take a detailed look!
lb...@gmail.com <lb...@gmail.com> #3
I believe we should dup
ps...@google.com <ps...@google.com> #4
Yes definitely. Thanks Siyamed!
In the meantime there maybe other ways to work around it. The main issue is that surface implicitly creates a seaprate layer which impacts the behavior of the blending modes. Being ale to just set the Brush on the paint directly would work around this in the most straightforward way.
lb...@gmail.com <lb...@gmail.com> #5
The issue is that the content depends on transparent pixels existing in the scene before the gradient is applied.
To address this you can do the following in order to force rasterization of the graphicsLayer into a separate buffer using CompositingStrategy.Offscreen
, then only draw the gradient on top of the pixels rendered by the text Composable.
Text("Hello World!", modifier =
// Use offscreen compositing strategy so that there are transparent pixels in the offscreen buffer
// to blend against with the SrcIn blend mode
Modifier.graphicsLayer(compositingStrategy = CompositingStrategy.Offscreen).drawWithCache {
val brush = Brush.horizontalGradient(listOf(Color.Red, Color.Blue, Color.Cyan, Color.Magenta, Color.Green))
onDrawWithContent {
drawContent()
drawRect(brush, blendMode = BlendMode.SrcIn)
}
}
)
jl...@google.com <jl...@google.com> #6
@ps...@google.com: When the process closes we stop the layout inspector.\
When we are not in live mode: that isn't necessary.
lb...@gmail.com <lb...@gmail.com> #7
Even then, you can make it just have a notification of "process ended", and have the most recent layout be shown till the process is live again.
This way, if the app crashes (or we killed it accidentally), we can still have a look at what was shown before.
It's not debugging, after all...
Description
STEPS TO REPRODUCE:
1. Have an app that shows content on top ("display over other apps", SAW permission)
2. Use Layout inspector to inspect some UI on it
3. Make sure that "live updates" is turned off, and leave the app anyway you wish.
The bug is that now the tool decides to show nothing, not letting you inspect what you recently manually chosen to check out.
Not only that, but often the layout inspector shows things as visible even though they aren't visible anymore.
------------------
Studio Build:
Version of Gradle Plugin:
Version of Gradle:
Version of Java:
OS:
Android Studio Giraffe | 2022.3.1 Canary 10
Build #AI-223.8836.35.2231.9762515, built on March 17, 2023
Runtime version: 17.0.6+0-b2043.56-9746777 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 10048M
Cores: 12
Registry:
external.system.auto.import.disabled=true
debugger.watches.in.variables=false
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
cn.jxzhang.plugin.json-formatter (1.4)
com.intellij.marketplace (223.8836.56)
com.dubreuia (2.3.0)
Show As ... (1.0.3)
String Manipulation (9.7.1)
GenerateSerialVersionUID (3.0.3)
idea.plugin.protoeditor (223.8214.6)
com.dethlex.numberconverter (1.5.0)
izhangzhihao.rainbow.brackets (2023.2.6)
com.ppismerov.ksvu (0.0.1)
com.google.mad-scorecard (1.2)
net.aquadc.mike.plugin (0.28)
com.developerphil.adbidea (1.6.8)
GenerateSerializationHelpers (1.0.6)