私は賛美歌のアプリケーションを作成しています。これには500賛美歌のようなものが含まれています。だから、この500の賛美歌詞をstring.xmlに保存しても大丈夫ですか?または、私のアプリがあまりにも多くのメモリスペースを必要としないため、私はデータベースに保存する必要があります。ありがとうsting.xmlに大きな文字列を保存しても問題ありません
0
A
答えて
0
私はそれをJsonファイルに入れて、最初のインストール時に読み込み中のanimatinを使ってスプラッシュ画面を表示すると、ロード中にjsonファイルを解析して領域に保存する方が良いでしょう
[
{
"Hymn1": {
"title": "title 1",
"singer": "singer1",
"Lyrics": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum"
}
},
{
"Hymn2": {
"title": "title 2",
"singer": "singer2",
"Lyrics": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum"
}
}
]
レルムのこのマニュアルを確認することができます:JSONファイルのデータベースの一例 https://realm.io/docs/java/latest/#json
0
あなたは.jsonファイル内のすべての情報を保存し、あなたのアプリでそのファイルを置くことができます。 ファイルの重さはそれほどありません。
関連する問題
- 1. UITableViewCellsを配列に保存しても問題ありませんか?
- 2. SQLコマンド文字列を連結しても問題ありませんか?
- 3. 別のストレージクラスに変数を保存しても問題ありませんか?
- 4. Node.js client-sessions - 大きな文字列はありませんか?
- 5. IMemoryCacheに問題があります。文字列に変換できません。
- 6. 文字列をテキストファイルとして保存していません。
- 7. cellForRowAtにuitableviewcellを登録しても問題ありません。
- 8. androidのファイルに文字列を保存できません
- 9. すべてのデータをデータクラスに保存しても問題ありませんか?
- 10. Python:ブール値と文字列の両方を返しても問題ありませんか?
- 11. C++で[length()]という文字列を入力しても問題ありませんか?
- 12. ドメインエンティティの可変プロパティを値オブジェクトとして保存しても問題ありませんか?
- 13. FacebookRedirect.axdはクエリ文字列を保存していませんか?
- 14. mysqlで文字列形式で保存しても構いませんか?
- 15. キーウィンドウを変更しても問題ありませんか?
- 16. Ruby 1.8.5を使用しても問題ありませんか?
- 17. デストラクタでベクターをクリアしても問題ありません
- 18. plistを使用しても問題ありませんか? iOS
- 19. TFSDeleteProject - ブランチを削除しても問題ありませんか?
- 20. カサンドラコレクションを使用しても問題ありませんか?
- 21. readLine()を保存できません。文字列変数
- 22. VBAチェックインデックスの文字列配列は何もありません
- 23. 300列ファミリのhbaseテーブルを作成しても問題ありませんか?
- 24. Ruby/Railsアプリも保存しません。エラーもありません
- 25. Netty + jQuery、url + query文字列を使用しても問題ありませんが、JQueryは何も受信しません。
- 26. C#文字列配列を使用したIN文の大まかな問題
- 27. WindowsForm Appの文字列に文字列がありません
- 28. Python3で辞書に情報を保存しても問題ありませんが、Python2ではありません
- 29. モジュロを含む文字列データを列に保存できません
- 30. 文字列をsedに置き換えてもファイルは保存されていません
試しましたか?もしそうなら、何が起こったのですか? – tadman
私はまだそれを構築しています –
xmlとデータベースの両方がファイルです。違いはありません。あなたのデータは構造体がデータベースを使用しない場合 – Mohsen