F FrankBerra Active Member Licensed User Longtime User Jan 5, 2018 #1 Hello everyone! I am facing a strange problem with labels. I am implementing a chat into my app and it works almost always but strangely sometimes the text in label doesn't wrap correctly. If you take a look to the attached image you can see that in red circles the word "trovare" is missing. If i add more chars to label the word "trovare" stays where it should stay (green circle) I am wondering why is this happening and if someone has a solution for this strange behaviour... Thanks in advance! Attachments LabelProblem.png 274.9 KB · Views: 620
Hello everyone! I am facing a strange problem with labels. I am implementing a chat into my app and it works almost always but strangely sometimes the text in label doesn't wrap correctly. If you take a look to the attached image you can see that in red circles the word "trovare" is missing. If i add more chars to label the word "trovare" stays where it should stay (green circle) I am wondering why is this happening and if someone has a solution for this strange behaviour... Thanks in advance!
F FrankBerra Active Member Licensed User Longtime User Jan 5, 2018 #2 Here someone had the same problem: https://stackoverflow.com/questions/45080215/word-wrapping-issue-in-android How to implement the following code in B4A? Code: textView.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE); Upvote 0
Here someone had the same problem: https://stackoverflow.com/questions/45080215/word-wrapping-issue-in-android How to implement the following code in B4A? Code: textView.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE);
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2018 #3 I think that this is the default value. You can set it with: Code: Dim p As Phone If p.SdkVersion >= 23 Then Dim jo As JavaObject = Label1 jo.RunMethod("setBreakStrategy", Array(0)) End If Upvote 0
I think that this is the default value. You can set it with: Code: Dim p As Phone If p.SdkVersion >= 23 Then Dim jo As JavaObject = Label1 jo.RunMethod("setBreakStrategy", Array(0)) End If
F FrankBerra Active Member Licensed User Longtime User Jan 7, 2018 #4 Super! Your code is working perfectly! (Maybe the default value of "setBreakStrategy" is changed after using LabelExtras (https://www.b4x.com/android/forum/threads/labelextras-advanced-click-handling.25834/#content) for obtaining clickable links in chat messages) Upvote 0
Super! Your code is working perfectly! (Maybe the default value of "setBreakStrategy" is changed after using LabelExtras (https://www.b4x.com/android/forum/threads/labelextras-advanced-click-handling.25834/#content) for obtaining clickable links in chat messages)