"ui"; ui.layout( <vertical gravity="center"> <text text="牙叔教程 简单易学" textSize="40sp" gravity="center"></text> <text id="content" textSize="40sp" gravity="center"></text> <vertical> <text text="牙叔教程" textSize="40sp" w="*" gravity="center"></text> <text text="简单易学" textSize="40sp" w="*" gravity="center"></text> </vertical> <text id="content2" textSize="40sp" gravity="center"></text> </vertical> ); ui.content.setText("牙叔教程\n简单易学"); ui.content2; let tv = ui.content2; let html = "<h6>牙叔教程</h6><p><font color='#00bbaa'>简单易学</p>"; tv.setText(android.text.Html.fromHtml(html));