Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

fix 15378

Open maonaoda opened this issue 2 years ago • 10 comments

Description of Change

Issues Resolved

  • fixes #15378

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

Tapped event gets triggered correctly on Label with multiline spans that are tappable.

None

Before/After Screenshots

  • Brfore demo2022090102

  • After demo2022090101

Testing Procedure

Hoping

Hope it's fixed soon, not quite like changing the design...

PR Checklist

  • [ ] Targets the correct branch
  • [ ] Tests are passing (or failures are unrelated)

maonaoda avatar Sep 01 '22 09:09 maonaoda

CLA assistant check
All CLA requirements met.

net-foundation-cla[bot] avatar Sep 01 '22 09:09 net-foundation-cla[bot]

should be related to #13348

maonaoda avatar Sep 01 '22 09:09 maonaoda

/azp run

jfversluis avatar Mar 08 '23 14:03 jfversluis

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Mar 08 '23 14:03 azure-pipelines[bot]

I would really appreciate if this can be merged in guys. This is causing a huge issue in my production app.

Is this issue fixed in MAUI? If so, then I will upgrade the app to MAUI.

Kas-code avatar Oct 18 '23 14:10 Kas-code

not yet, since maui is using this same code↑ as xamarin so this bug also exists.

maonaoda avatar Oct 19 '23 06:10 maonaoda

@maonaoda Thanks for the info. I am keen to get this fixed. What is left to do to get this merged in? How can I help?

Kas-code avatar Oct 19 '23 07:10 Kas-code

Submit a new Issue to MAUI, then waiting for them to notice and fix on Maui。 I think Xamarin is unlikely to fix,. And change UI design may be another way to avoid this problem that i did.

maonaoda avatar Oct 19 '23 07:10 maonaoda

@maonaoda I implemented a custom renderer which overrides LabelRenderer in my project, and also overrode the function RecalculateSpanPositions in order to use your code change inside my project.

It mostly fixes the issue but there is still a small bug.

If the span at the end of the line is only one character long then it is not clickable.

If the span at the end of the line is more than one character long, then clicking anywhere in the span, apart from the last character triggers the click event.

So I think that the spanEndX is off by one character. I've tried to look into how to fix this but I can't figure it out.

Do you have any advice?

Kas-code avatar Oct 21 '23 18:10 Kas-code

@jfversluis Any chance that this one is making it into a Xamarin.Forms service release?

thisisthekap avatar Jan 18 '24 10:01 thisisthekap

Now that we're so close to the sunsetting of Xamarin.Forms unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR.

Please have a look at the evolution of Xamarin.Forms, .NET MAUI. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.

Again, thank you so much for being a contributor and Xamarin.Forms user!

jfversluis avatar Apr 25 '24 08:04 jfversluis

I will check it on maui~

maonaoda avatar Apr 25 '24 08:04 maonaoda