fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Changing border color doesn't reflect in the view

Open arpanbag001 opened this issue 1 year ago • 0 comments

We use GitHub Issues for bugs.

If you have a non-bug question, please ask on Stack Overflow: http://stackoverflow.com/questions/tagged/fresco

--- Please use this template, and delete everything above this line before submitting your issue ---

Description

Changing border color of SimpleDraweeView doesn't reflect in the view until image is set again

[FILL THIS OUT: Explain what you did, what you expected to happen, and what actually happens.]

Reproduction

  1. Create a SimpleDraweeView in xml, with any border width / padding / color
  2. Set an image
  3. Call conversationProfilePicture.hierarchy.roundingParams!!.borderColor = xxxx
  4. Observe that the border color doesn't change
  5. Now update the code to set an image URL to the SimpleDraweeView after setting border color
  6. Observe that if you set image URL after setting border color, border color updates as expected

[FILL THIS OUT: How can we reproduce the bug? Provide URLs to relevant images if possible, or a sample project.]

Solution

[OPTIONAL: Do you know what needs to be done to address this issue? Ideally, provide a pull request which fixes this issue.]

Workaround:

  1. Re-set the controller by calling mySimpleDraweeView.controller = mySimpleDraweeView..controller

Check why re-setting the controller fixes the issue, and do the same in the code of setting border color

Additional Information

  • Fresco version: [FILL THIS OUT] 2.6.0
  • Platform version: [FILL THIS OUT: specific to a particular Android version? Device?]

arpanbag001 avatar Apr 24 '23 12:04 arpanbag001