Samsung/Tizen.CircularUI

System.Environment.NewLine should insert a new line everywhere possible

Closed this issue · 5 comments

axa88 commented

Describe the bug
Similar to issue #250 , the System.NewLine does not work in a Toast

Toast.DisplayText($"ABC{System.Environment.NewLine}DEF", 0);

Result:
image

To Reproduce
Steps to reproduce the behavior:

  1. Create a Toast as above for example in CirclePage
  2. Observe result in screenshot

Expected behavior
System.Environment.NewLine always inserts a new line no matter where it is used.

Screenshots
see above

Environment (please complete the following information):

  • Target Product [Emulator 5.5 3.7 SDK 2.8.0.28]
  • Tizen Platform Version [Tizen 5.5]
  • Tizen.CircularUI Version [1.5.0-pre6]

I recommend to use <br> instead of newline

axa88 commented

I recommend to use <br> instead of newline

This is what I have been doing until I found a dependancy using newline. I can't change this.
I would need to search and replace which is not optimal.

Basically, Text of toast support a simple html tag.
So, I think we do better to use tag instead of newline .

App developer also can change Text color with tag like below
"<span color=red>Toast</span><br>",

It is not Bug, but a kind of API design and policy and we can decide which policy was used.

axa88 commented

Ok. Perhaps you have valid reasoning, which I don't see.
Some view use standard .net text, some view does not.
Ultimately I will need to develop custom translation layer just for toast. This seems to me inconsistent