2016-01-05 164 views
-2
public void printStarterservices(View view) { 
    ((TextView) findViewById(R.id.smartliving_text)) 
     .setText("• Personal Care Services" + "• HouseHold Task" + 
       "• Shopping Tasks" + "• Rehabilitation" + 
       "• Smart Living" + "• Respite & Befriending Care" + 
       "• Walking or Sleep overnight" + "• Cleaning" + 
       "• Bed making and more"); 
} 
+0

使用“WebView”。或者,使用'SpannableStringBuilder'和'BulletSpan'来创建文本以进入'TextView()'。 – CommonsWare

回答

0

最简单的方法是在您的项目之间添加\n换行符。

// ... 
"• Personal Care Services" + "\n\n" + 
"• HouseHold Task" 

这将解决每个项目的新行。

替代这是

  • 使用HTML文本<ul><li>Html.fromHtml()格式化的TextView
  • 在一间的LinearLayout多TextViews或ListView
  • 使用网页视图,并显示HTML内容