Status Update
Comments
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com>
al...@google.com <al...@google.com>
ho...@google.com <ho...@google.com> #2
Can you attach / share a project that reproduces the issue?
jp...@gmail.com <jp...@gmail.com> #3
because just occur recyclerview inside viewpager2 with constraintlayout, if paging3 use Independently with viewpage2 it's not problem.
ho...@google.com <ho...@google.com> #5
jp...@gmail.com <jp...@gmail.com> #6
ho...@google.com <ho...@google.com> #7
jp...@gmail.com <jp...@gmail.com> #8
I'm sorry to say, but it's somewhat disheartening to take time to create a project for one bug, just to see it quickly being closed as "Won't fix (Intended behavior)".
Especially, as I was available to answer any questions and we ended up confirming that there was some sort of confusion about the intent of the project.
ho...@google.com <ho...@google.com> #9
Sorry for the confusion and thanks for the project I did download and run it.
Maybe I am missing the issue. What do you think is the bug?
As I understand it:
- MotionLayout has ability to set setters
- ImageView does not have setPadding(float)
- You worked around it by writing a setPadding setter in a subclass All this is working as intended.
I thought your use of fun setPadding(size: Int) = super.setPadding(size, size, size, size)
was a bit of a problem because padding is dimension
I will re-open it
jp...@gmail.com <jp...@gmail.com> #10
I reported the issue, because I think that the ImageView
is not properly applying the padding.
I'm only using MotionLayout
, because I could consistently reproduce the problem with it. However, I believe that it has nothing to do with the problem.
I believe this an ImageView
issue. I noticed that, even though ImageView
outline is invalidated, it's frame is not properly updated and that results in a visual bug.
Please take a look at PaddingImageViewFixed
, which tries to fix the issue, and does so by enforcing that setFrame
is always called.
I don't fully remember the workflow, but, looking at the comment in PaddingImageViewFixed
, it seems that ImageView.configureBounds()
is related.
Thank you. 🙏
ho...@google.com <ho...@google.com> #11
This was added to the "MotionLayout" issues and I was viewing it as such. I will assign to someone who might know more about ImageView
jp...@gmail.com <jp...@gmail.com> #12
Thank you.
Description
I believe that I found and issue with
ImageView
, while I was working withMotionLayout
.It seems that there are times when the
ImageView
outline is invalidated, but its drawable's bounds are not properly updated, resulting in a visual glitch.I have created a sample project to reproduce this issue:
The project shows two
ImageView
with the same icon. When the issue occurs, the topImageView
's icon is not properly centered.I am able to reproduce the issue by running the project in the API Sv2 emulator. The issue occurs more consistently when the app is run from a fresh state.