找回密码
 立即注册
TheMimeTypefile判别 | android开发 2022-11-07 75 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
iconFile源码实例,判别图标被点击的动作,操作触屏手机的基本关键,使用自定义的MyAdapter来将数据传入ListActivity,设置ListItem被点击时要做的动作,如果是文件夹就再运行getFileDir(),如果是文件就运行openFile(),调用getMIMEType()来取得MimeType,设置intent的file与MimeType,判别文件MimeType的方法,如果无法直接打开,就跳出软件列表给用户选择。变量声明:items:寄存显示的称号,paths:寄存文件途径,rootPath:起始目录。

(The iconFile source code instance is used to determine the action of the icon being clicked, the basic key to operating the touch screen phone, use the customized MyAdapter to transfer data to the ListActivity, set the action to be taken when the ListItem is clicked, run getFileDir() if it is a folder, run openFile() if it is a file, call getMIMEType() to obtain the MimeType, set the file and MimeType of the intent, and determine the MimeType of the file, if it cannot be opened directly, The software list will pop up for the user to select. Variable declaration: items: the name of the register display, paths: the path of the register file, and rootPath: the starting directory.)

[下载]11473507439.rar




上一篇:Android仿苹果上下翻页效果源代码
下一篇:android带翻页的电子阅读器应用