How to add images within texts that stored in sqlite in android

廉价感情. 提交于 2019-12-24 09:42:33

问题


I want to add some images between the texts. I stored texts in sqlite db. How can I determine the right location of images in texts. For example, I have 5 paragraphs in one lesson that I stored all those paragraphs in one cell of a row in db named body_of_lesson. Now I want to add an image after line 3 of first paragraph and 1 image after second paragraph. How can I determine these locations and add images into the locations? In other lessons might be vary the locations. I saved texts as HTML formatted into the database.

Please help me !!


回答1:


use image ref in your html. e.g. <a href="file:///**", which ** is the image path stored in sqlite.



来源:https://stackoverflow.com/questions/40330547/how-to-add-images-within-texts-that-stored-in-sqlite-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!