在ListView android中显示SD卡数据

时间:2011-06-15 09:53:09

标签: android android-sdcard

有人可以建议我如何以我的设备SD卡中存储的ListView格式显示所有公开数据

1 个答案:

答案 0 :(得分:1)

如何重复使用其他人的课程,以便编写更少的代码?

http://openintents.org/en/filemanager

  

第三方开发人员可以通过简单的意图使用OI文件管理器来显示“打开文件”,“保存文件”或“选择文件夹”活动。

     

文件管理器具有PICK_FILEPICK_DIRECTORY意图:

     

Intent intent = new Intent("org.openintents.action.PICK_FILE"); startActivityForResult(intent, 1);

     

您可以通过setData()将数据设置为文件URI(例如"file:///sdcard/notepad.csv")来提供预先选择的文件或文件夹。挑选的文件URI可以在onActivityResult()getData()中获得。