Can i set @tap event on <Span> into <FormattedString>
See original GitHub issueHello
Case: I want to write link into text, but i cant set event @tap on <Span>
element, because it doesn’t work. How can i solve this problem?
Example:
<FormattedString>
<Span text="Some text: " />
<Span text="link" @tap="openUrl" />
</FormattedString>
How can i solve this problem?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Nativescript FormattedString - tap event on a Span
The goal is when the user taps them to execute a function displaying the agreement or the policy. The problem is that the...
Read more >formattedstring - spans tap gesture? - MSDN - Microsoft
Are there any ways to detect the tapping on a specific Span of a FormattedString? The only way I could possibly think right...
Read more >Style for Label.FormattedString.Span broke...
I found out by trial and error that I can now specify TargetType="Span" on the Style and then it works. Visual Studio for...
Read more >String resources | Android Developers
A single string that can be referenced from the application or from other resource ... In this formatted string, a <b> element is...
Read more >UI & Styling - NativeScript Docs
You can use android.systemIcon to set one of the system icons available in Android. In this case, there is no default behaviour for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solution HERE! 😁 @ricky-bos @kostyabushuev
Guys I just solving this problem, when I have composed text with Privacy Policy and Terms of Service tapthru links, and its not wrapped to fit into screen. What I did was separate text into Labels (which are tapables - Span is not tappable because it has not its own View), and wrap thoose labels into
WrapLayout
. Now it works pretty well as expected. Give it a try!I can confirm the above solution / workaround also works. Thanks @souriscloud !