I have some long text to input in a Text control that is going out of the screen. I want to make it multiline in same text. How can I do that via JSON String Resource and from java code?
I have already tried appending \n (newline) character but it works neither via JSON nor via code
Additional information
Developer Platform: Windows
DevEco Studio version: 2.1.0.501
SDK API version: 5
SDK version: 2.1.1.21
Device: Simulator (Tablet Matpad Pro)
I found the answer, we have to add a property ohos:multiple_lines="true" in the Text component, and then the text will automatically appear in multiple lines. Also appending a new line character starts work.
I have some long text to input in a Text control that is going out of the screen. I want to make it multiline in same text. How can I do that via JSON String Resource and from java code?
I have already tried appending \n (newline) character but it works neither via JSON nor via code
Additional information
Developer Platform: Windows DevEco Studio version: 2.1.0.501 SDK API version: 5 SDK version: 2.1.1.21 Device: Simulator (Tablet Matpad Pro)