How to access assets folder in my android app?

前端 未结 3 1996
抹茶落季
抹茶落季 2021-01-13 12:36

I\'m writing at a little project for a friend. A notecard application. My plan is to put the notecards in an xml format so i can import and export them easily. I located the

3条回答
  •  不知归路
    2021-01-13 13:28

    Zip your xml folder (xml.zip for example) and put it in assets. Getting assets with AssetsManager is very slow. Also, doing so you can maintain your directory structure and just copy it to sdcard and extract it there. This will be a lot faster than getting each file in the directory. You can use this post for the unzipping: How to unzip files programmatically in Android?. Hope this helps.

提交回复
热议问题