私は webView を使用しており、私が書いているコードは string.xml にあります。
String contact = "<html xmlns=\"http://www.w3.org/1999/xhtml\"> " + "\n" +
"<body style=\"font-family:Arial;text-align:center;\">" + "\n"
context.getString(R.string.contact_text) + "\n"+
"</body>" + "\n" +
"</html>";
webContact.loadDataWithBaseURL(null, contact, "text/html","utf-8", null);
問題は、R.string.contact_text に改行がありますが、書かれていないことです。
で試しました
\n
<br>
<br></br>
これどうやってするの?
ありがとう!