[android开发] Android判断和读取图标列表iconFile实例

[复制链接]
发表于 2022-11-7 11:47:35
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带翻页的电子阅读器应用

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表