public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater layoutInflater=LayoutInflater.from(context); convertView=(LinearLayout) layoutInflater.inflate(R.layout.chatitem, null); TextView et = (TextView) convertView.findViewById(R.id.tvChat); et.setText(Html.fromHtml(list.get(position), imageGetter, null)); return convertView; }
如果是直接用EditText显示的话就换成et.setText(<pre class="java" name="code">et.setText(Html.fromHtml(list.get(position), imageGetter, null));
是不是很简单啊,其实就是两个方法et.setText(Html.fromHtml(list.get(position), imageGetter, null)); 和 et.setText(Html.toHtml(list.get(position), imageGetter, null));
因为太简单了,所以就没说太多,希望能帮助到别人,如果不明白...,应该不会吧?