如何在Android上将HTML字符串传递给WebView
嗨,我正在解析xml,然后将其加载到Web视图,解析之后,我创建了四个字符串,以便可以将所有字符串附加到一个视图。我能够在Web视图上获得两个视图,但不能获得前两个字符串。 请用我的代码建议我,我在哪里出错了,以及在网络视图上获取格式化的html字符串的正确方法是什么。请看一下我的代码,并帮助我解决此问题。 @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub String chapterTitle = ""; String SubChapterTitle=""; String chapterIntro =""; String chapterContent=""; View view = convertView; if (convertView == null) { // view = inflater.inflate(resourceid, null); view = getLayoutInflater().inflate(R.layout.webviewitem, null); } synchronized (view) { …