1. 获取AssetManager

   AssetManager assetManager = context.getAssets();


2. 列出assets文件夹下全部文件

  String[] filePathList = assetManager .list("");


3. 打开某个文件

InputStream is = assetManager .open("test.txt");


4. 获取到InputStream后,就能够通过IO库进行文件操作了。或者通过BitmapFactory.decodeStream(is)得到Bitmap对象

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2021-07-01
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-02-12
猜你喜欢
  • 2022-03-11
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-08-28
相关资源
相似解决方案