Fixed
Status Update
Comments
cc...@google.com <cc...@google.com> #2
I know that there is an API council request to change Modifier.drawLayer
to Modifier.graphicsLayer` thus dropping the "draw" prefix to the modifier. I think it might be reasonable to rename the following to match the naming of the fields within the layer API:
Introduce the following:
Modifier.drawOpacity -> Modifier.alpha
Modifier.scale,
Modifier.rotateX,
Modifier.rotateY,
Modifier.rotate (maybe rotateZ but maybe drop the Z to keep it simple?)
Modifier.translate
I think it is reasonable to have both Modifier.offset as well as translate with the documentation indicating that translate is more effective for animated use cases. The only concern I have is if we can somehow detect several of these modifiers in a chain would be able to effectively squash them into a single layer, (ex: Modifier.alpha(0.5f).scale(2f).rotate(45) etc.). What do you think?
du...@google.com <du...@google.com>
ap...@google.com <ap...@google.com> #3
1) you forgot to mention:
Modifier.drawShadow -> Modifier.shadow
2) I think for scale we can both overloads like
Modifier.scale(scaleX: Float, scaleY: Float)
Modifier.scale(scale: Float) = scale(scale, scale)
3) can we do similar thing for rotation? in simple cases you only want to rotate x and y, right?
Modifier.rotation(rotationX: Float, rotationY: Float, rotationZ: Float)
Modifier.rotation(rotation: Float) = rotation(rotation, rotation, 0)
4) and please, lets not add Modifier.translate() just yet. I am ok with this being available as more low level api Modifier.drawLayer() where we have more options, but not something so easy discoverable. in the doc we agreed that it could be useful to keep it for some complex cases. I am strongly convinced we shoudn't have both Modifier.offsetPx() and Modifier.translation()
5) so the decision to rename to graphicLayer() is final? I have a cl which will be affected by that:https://android-review.googlesource.com/c/platform/frameworks/support/+/1496274 . Should I already use new name GraphicLayerScope there?
Modifier.drawShadow -> Modifier.shadow
2) I think for scale we can both overloads like
Modifier.scale(scaleX: Float, scaleY: Float)
Modifier.scale(scale: Float) = scale(scale, scale)
3) can we do similar thing for rotation? in simple cases you only want to rotate x and y, right?
Modifier.rotation(rotationX: Float, rotationY: Float, rotationZ: Float)
Modifier.rotation(rotation: Float) = rotation(rotation, rotation, 0)
4) and please, lets not add Modifier.translate() just yet. I am ok with this being available as more low level api Modifier.drawLayer() where we have more options, but not something so easy discoverable. in the doc we agreed that it could be useful to keep it for some complex cases. I am strongly convinced we shoudn't have both Modifier.offsetPx() and Modifier.translation()
5) so the decision to rename to graphicLayer() is final? I have a cl which will be affected by that:
sh...@meta.com <sh...@meta.com> #4
And about the possible squashing, it is not really related to this topic as even now it is possible to do Modifier.drawLayer(alpha=0.5f).drawLayer(scale=2f).drawLayer(rotate=45). But yes, we could explore it in the future. I think not squashing at all is good enough for now
Description
Version used: androidx.paging:paging-*:3.0.0-alpha01
Devices/Android versions reproduced on: Samsung S-10
I am using PositionalDataSource in my code and when i request to loadAroud() a specific index, it loads sequentially from last loaded index till requested index instead of jumping and loading around requested index.
Its was working on stable version : androidx.paging:paging:2.1.2