开发者

save multiple text line in sqlite

开发者 https://www.devze.com 2023-02-16 02:02 出处:网络
I want to know how to save multiple lines of tex开发者_运维知识库t in a SQLite field. I create a EditText

I want to know how to save multiple lines of tex开发者_运维知识库t in a SQLite field.

I create a EditText

I enter my Input with multiple lines of text

IE:

My test with

Multiple Line

Of description

When I save the text in SQLite using something like below, it only retains the first line.

db.insertDescription(EditText.getText().toString());

Is it possible to save all of the text instead of just the first line?


Parse out the new lines and replace it with something else, e.g. $%&%$, and put the new lines back in when you fetch from the database.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号