Android的web视图的问题:不换行文本 [英] WebView android issue: does not wrap the text
本文介绍了Android的web视图的问题:不换行文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我搜索了一个解决方案的互联网,但我不能找到它。
I've searched the internet for a solution but i can't find it.
我有显示文字,只是文字的WebView。我想换了的WebView文本,是可能的还是什么?
I have a WebView that display text, Just text. i want to wrap the text in the WebView, is that possible or what?
和我想使用户能够在web视图来选择特定的文字,让他能够通过短信向选定的文本发送,是可能的?
and i wanna make the user be able to select a certain text in the WebView and make him able to send the selected text by SMS, is that possible to?
推荐答案
我找到了解决办法。你必须增加您的Web文档一些div标签,然后添加CSS类。我这样做:
I found the solution. You have to add some div tag on your web document, and then add a css class. I did this:
<div class="wrap">
用CSS类是这样的:
with a css class like this:
.wrap {
word-wrap:break-word;
}
这篇关于Android的web视图的问题:不换行文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文