touch上的the folder iphone怎么用

[教程]触屏版Recovery 最新TWRP 2.4.4.0(安装及使用详细教程)_gfive吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:312贴子:
[教程]触屏版Recovery 最新TWRP 2.4.4.0(安装及使用详细教程)收藏
很多同学在刷机时使用触屏版Recovery 有压力,哈哈,全英文的界面。。。苦了一堆人。吧主特地去网上找了个教程。其实很简单的。1楼为下载安装刷机的使用方法。2楼为备份恢复及挂载的补充教程。---------------------------------------原帖内容如下-------------------------------------------------------Team Win Recovery Project 2.x, or twrp2 for short, is a custom recovery built with ease of use and customization in mind. It’s a fully touch driven user interface – no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.Phone look:Tablet look:CHANGELOG for 2.4.4.0:-Added another libtar hardlink workaround to fix restore of some backups (usually related to Ubuntu Touch)-More fixes for the file selector-Switched from using busybox md5sum to a direct C function call-Fixed capturing the exit status of tar based backups/restore - TWRP will display that there was an error if there was one again-Update exFAT to latest commits-Added a build flag to disable using the ioctl for screen blankingCHANGELOG for 2.4.3.0:-Fixed 2 bugs related to restore, one dealing with mknod failures (by bigbiff) and one dealing with restoring hardlinks (by Dees_Troy)NOTE: If your backups weren't restoring correctly in earlier 2.4.x versions they should restore correctly now. Hopefully you didn't delete those backups. If you're still having problems, run the restore, go to advanced and copy log, then give us the log. Complaints without logs will be rightfully ignored.-Added a scroll bar to file selectors and listboxes courtesy of Tassadar-Added libblkid for more accurate detection of file systems and can now detect exFAT properly thanks to bigbiff-Added a screen dim effect 2 seconds before screen off on some devices-Finally fixed file selector crash (one of the joys of working with multi-threaded software)-Fixed loading of screen timeout setting during startup-Improvements and bugfixes to screen timeout code-Fixed persistence of the 24 hour / military time settingCHANGELOG for 2.4.2.0:-Add screen timeout - screen will turn off automatically after 60 seconds, saves battery and prevents screen burn-in especially on AMOLED devices-Add a brightness setting (requires device specific setup and only some devices have been added)-Add a root checker and offer to install SuperSU if the device isn't already rooted-Add a write buffer to libtar backups, significant improvements to speeds when backing up to exFAT target, minor improvements for other file systems-Check and offer to fix root permissions if broken-Add an option for a 24 hour clock display instead of AM/PM (aka military time)-Move stock recovery reflash check to occur during the reboot cycle-Add support for some MTK6xxx devices-Change libtar to vfork to help prevent memory problems-Add a "clicked" effect to most buttons, file selector, and listbox-Improve timezone listbox to be more like file selector (per pixel kinetic scrolling, etc)-Remove some no longer used settings (Forced MD5 sum on zips, size checking on image backups)-Other minor bugfixes and improvementsCHANGELOG for 2.4.1.0:-Fixed a problem with mkdosfs that formatted sdcards to 2GB-Fixed handoff between vfat and exFAT on devices where blkid didn't detect vfat (fixes some issues with mounting sdcards)-Fixed problems with changing working directory on MD5 creation/checking that may have prevented unmounting-Backups will now store a copy of the backup log after the backup is completed (only if backup is successful)CHANGELOG for 2.4.0.0:-Using libtar instead of busybox's tar for better control over tar file creation and breaking the 2GB barrier that busybox imposes (thanks to bigbiff)-Support for exFAT formatted sdcards (also thanks to bigbiff)-Support for decrypting Samsung TouchWiz encrypted devices including internal and external storage (special thanks to a3955269 for figuring it out)-Improvements to OpenRecoveryScript including displaying a proper GUI while the script is running-Added wipe cache and dalvik after ADB Sideload-Replaced many system calls with their native C counterparts-Fixed bugs in file manager where it would display an empty list after moving or deleting a folder-Fixed AOSP recovery commands to run after decryption on encrypted devices-Improvements for building TWRP in CM10.1-Other minor bugfixes and improvementsNOTE: 2.4.0.0 is, as always, still compatible with your older backups!DOWNLOAD:The fastest and easiest way to install TWRP is to use the GooManager app:Play Store LinkDirect Download1) Install GooManager from the Play Store2) Open GooManager and provide root permissions3) Hit Menu (or the button with the 3 dots on your screen) and then Install OpenRecoveryOR:You can find more information and download links on our website!BUGS:If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!SUPPORT:Live support is available via #twrp on Freenode with your IRC client or just click this link. -----------------------------------------开始我们的学习---------------------------------------------------【1】TWRP 2.4.4.0 touch recovery的下载及安装:首先下载GooManager_2.1.2.APK软件并安装到手机(下载地址)安装好以后手机会找到这样一个图标(见图1)点击GooManager图标运行出现这个界面(见图2),首次打开会提示ROOT授权,选是。点击手机菜单键会出现如下菜单(见图3)选Install OpenRecoveryScript然后选YES(见图4)然后会出现提示你下载openrecovery-twrp-2.4.4.0-sgh-t989.img文件的对话框选YES(见图5)在读秒之后会自动下载并安装,我们等待即可(见图6)完成之后会返回(图3)的界面,选上一个选项Reboot Recovery可以直接重启到TWRP界面。(感谢月下独钓发现的错误)重启进入recovery模式见到的第一个画面。(见图7)安装成功进入Team Win Recovery Project 的主界面(见图8)【2】:使用Team Win Recovery Project V2.4.4.0 刷机。首先要做的同样也是Wipe,我们选择第2个按钮Wipe(见图8)Wipe界面共有6个选项,刷机之前依次使用1-4即可。(见图9)最下面的两个选项左边用来清理内存卡,右边用来清理手机内存的,若无必要切忌使用。选择Wipe中的第一个选项Cache之后显示如下界面(见图10)滑动下方的向右箭头即开始,待出现Back按钮返回即可。依次选择抄作同上(见图11)继续同上(见图12)再继续(见图13)上面步骤做好之后返回到图8的画面里选择第一项Install就会见到如下画面(见图14)上面2个单选项,左面为打开内存卡,右边为打开手机内存。找到你放刷机文件的位置并选择你要刷的文件(见图15)你会看到如下的画面,滑动箭头刷机就开始了(见图16)刷机运行结束后出现如下画面(见图17)Home为返回主界面,Wipe cache/dalvik为清理Cache和Dalvik区(有的包需要,做做也没坏处)都做好之后点下Reboot System手机就会重启系统了。选Wipe的画面(可做可不做,只有个别包需要)(见图18)确定之后的样子。(见图19)结束返回。(见图20)OK正常开机!!(见图21)顺利进入系统界面,本次刷机成功!!!!(见图22)GooManager_2.1.2.APK下载地址:GooManager_2.1.1.APK下载地址:有哪位童鞋想使用终端刷入这个TWRP 2.2.2.0 touch recovery的可以访问直接下载openrecovery-twrp-2.2.2.0-sgh-t989.img这个文件即可使用。7zXg.jpg(23.86 KB)AO13.jpg(24.96 KB)nkUM.jpg(34.32 KB)RAsb.jpg(18.65 KB)
TWRP 2.2.2.0 touch recovery(备份恢复补充教程)主界面里的第3个键Backup为备份,第4个键Restore为恢复,第5个键Mount为挂载。【备份】点选第3个键Backup之后见到如下画面。左上方区域选择你需要备份的块(默认12)我自己一般选1235。右边2个键上方为更新字节(不清楚作用)下方为设置备份名(这个很有用)下方有2个圆点的单选项,左边为内纯卡,右边为手机内存。全部设置完成后滑动最下方的箭头开始备份。【恢复】点选主界面的第4个键Restore就看见如下画面。最上方2个单选项,左边还是内存卡,右边还是手机内存。从哪恢复点那里,妈妈再也不用担心我恢复系统了。SO EASY !中间区域选择你的备份(点一下)。选完进入如下界面。左上方区域选着你需要恢复的块。右上方区域2个键,上边为备份改名,下边为删除备份。如果都不需要更改进入后直接滑动下方箭头就开始恢复了。【挂载】点选中界面中的第5个键Mount就能进入挂载界面。这个最简单,中间区域2个圆点(单选项)左为卡,右为手机。点选你要挂载的,手机连到电脑USB再点一下Mount USB Storage。OK!主界面里选Advanced进入里边有个File Manager功能可以简单的管理文件。点选Reboot进入可以1、System启动系统。2、Power Off可以关机。3、Recovery重启之后回到TWRP主界面。
很好很强大!
介个必须有呀!   -- 怀念,如此深刻的压迫着神经,让曾经如电影的画面般一一闪过,止不住的滑向虚无、
救命啊,不知道升级包放在哪里了,按reboot又出不来,老是提示updating partition details
支持支持支持
请问楼主领航版可以刷什么系统呀,是不是就是g9
给力啊,赞一个
很好,很详细
谢谢大神啦
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或CJ 越来越像一个游戏展了,小编内心倍感欣慰。
此交易对于苹果将意味着,不久前砸下十亿美元投资滴滴出行,短期内就可以收到 25% 的...
SE方面宣布旗下知名手游产品《劳拉GO》、《杀手GO》将迎来限时降价。
苹果前公关部主管Natalie Kerris,曾为苹果服务14年。
从 FCC 网站上显示的备案图片中我们可以发现,这款设备将支持手写笔,同时还配备有后...
今年夏天,各地Apple Store都掀起了一股“编程热”。
随着iPad Pro越来越被消费者认可,相信配件厂商的定制品也会越来越多。
数据显示,三星Galaxy S7 Edge是今年上半年最畅销的Android智能手机,销量估计达到133...
游戏采用了复古的像素风格的画面设计,游戏中的背景音乐也与游戏的风格相得益彰。
游戏中玩家所控制的是一个简简单单的齿轮,玩家需要控制这个齿轮不断的通过各种机关和...
《白猫计划》是日本游戏开发商 Colopl 一款知名的 ARPG 手游,该游戏在日本区曾获得 i...
正所谓众口难调,在种类繁多的赛车游戏当中,有玩家喜欢追求真实飚车的畅爽与刺激,那...
《死亡躯壳(Dead Shell: Roguelike RPG)》是一款融入了 Roguelike 元素的 RPG 作品...
与前作中一样,游戏中玩家所扮演依然是一名囚犯,为了从监狱当中逃脱出去,他需要摆脱...
逼真还原真实场景的赛车游戏一向都是玩家们的心头所好,伴着各种交替变换的场景,跟一...
随着iPad Pro越来越被消费者认可,相信配件厂商的定制品也会越来越多。
虽然苹果在 iPhone 6s 中带来了一系列的改进,但是总的来说,这是一款不防水的手机。
或许只是简单的改造而已,不过我们都想知道 Lightning EarPods 到底是什么样的~
套个手机壳就好了,而且第二代的手机壳还增加了很多新功能~
虽然采用 Lightning 接口能够大大提升设备的音质表现,但这意味着消费者需要重新购买...
对于 iPhone 用户来说,给手机充电和备份的 Lightning 充电线缆无疑是非常重要的,但...
《精灵宝可梦GO》魔力不减,我们希望看到更奇葩的设计出现~
如果喜欢,不妨为iPhone准备一个?
各位亲我想知道我媳妇的touch怎么才能和她的诺基亚e5蓝牙上网。。。另附媳妇照片
注册时间 最后登录
在线时间44 小时 UID
主题帖子人气
白苹果, 积分 1157, 距离下一级还需 343 积分
引用6楼凌风、羽于 17:57发表的: 表示来看楼主媳妇的……
注册时间 最后登录
在线时间266 小时 UID
主题帖子人气
注册时间 最后登录
在线时间1777 小时 UID
主题帖子人气
心已成死灰,无法复燃
进来看图片的
距离产生美!!!
注册时间 最后登录
在线时间1598 小时 UID
主题帖子人气
提示: 作者被禁止或删除 内容自动屏蔽
注册时间 最后登录
在线时间853 小时 UID
主题帖子人气
买个正版吧
注册时间 最后登录
在线时间1714 小时 UID
主题帖子人气
就你媳妇,顶你
注册时间 最后登录
在线时间34 小时 UID
主题帖子人气
注册时间 最后登录
在线时间764 小时 UID
主题帖子人气
提示: 作者被禁止或删除 内容自动屏蔽
注册时间 最后登录
在线时间404 小时 UID
主题帖子人气
注册时间 最后登录
在线时间3106 小时 UID
主题帖子人气
添加ibluever的官方源,一定可以下载的
威锋旗下产品
Hi~我是威威!
沪公网安备 29号 | 沪ICP备号-1
新三板上市公司威锋科技(836555)
增值电信业务经营许可证:
Powered by Discuz!1281人阅读
android(19)
android 4.0自定义Folder--UFolder
===============
LauncherSettings & Favorites 增加
static final int ITEM_TYPE_UFOLDER = 5;
用以区分普通Folder
1.在各个地方针对ufolder进行判断,进行定制
1)//加载default_worksapce.xml,并记录到数据库
LauncherProvider.java
private long addUFolder(SQLiteDatabase db, ContentValues values) {
values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_UFOLDER);
values.put(Favorites.SPANX, 1);
values.put(Favorites.SPANY, 1);
long id = generateNewId();
values.put(Favorites._ID, id);
if (dbInsertAndCheck(this, db, TABLE_FAVORITES, null, values) &= 0) {
return -1;
private int loadCustomFolder(SQLiteDatabase db, int workspaceResourceId) {
if (TAG_UFOLDER.equals(name)) {
int titleResId =
a.getResourceId(R.styleable.Favorite_title, -1);
if (titleResId != -1) {
title = mContext.getResources().getString(titleResId);
title = mContext.getResources().getString(R.string.folder_name);
values.put(LauncherSettings.Favorites.TITLE, title);
long folderId = addUFolder(db, values);
added = folderId &= 0;
ArrayList&Long& folderItems = new ArrayList&Long&();
values.clear();
values.put(LauncherSettings.Favorites.CONTAINER, folderId);
// get the download app list
getCustomAppList();
for (AppInfo appInfo : appList) {
long id = addCustumAppShortcut(db, values, packageManager, intent, appInfo);
if (id &= 0) {
folderItems.add(id);
// We can only have folders with &= 2 items, so we need to remove the
// folder and clean up if less than 2 items were included, or some
// failed to add, and less than 2 were actually added
//if (folderItems.size() & 2 && folderId &= 0) {
// We just delete the folder and any items that made it
/*deleteId(db, folderId);
if (folderItems.size() & 0) {
deleteId(db, folderItems.get(0));
}//获取系统下载的app列表
private ArrayList&AppInfo& appList = new ArrayList&AppInfo&();
private void getCustomAppList() {
List&PackageInfo& packages = mContext.getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES);
for (int i = 0; i & packages.size(); i++) {
PackageInfo packageInfo = packages.get(i);
if ((packageInfo.applicationInfo.flags & ApplicationInfo.DOWNLOADED_FLAG) == 0) {
ActivityInfo aI
aInfo = packageInfo.activities[0];
} catch (Exception e) {
Log.w(TAG, &Got exception for getCustomAppList&, e);
AppInfo tmpInfo = new AppInfo();
tmpInfo.appName = packageInfo.applicationInfo.loadLabel(mContext.getPackageManager()).toString();
tmpInfo.appIcon = packageInfo.applicationInfo.loadIcon(mContext.getPackageManager());
tmpInfo.packageName = packageInfo.packageN
tmpInfo.versionName = packageInfo.versionN
tmpInfo.versionCode = packageInfo.versionC
if (aInfo != null) tmpInfo.className = aInfo.
// Only display the non-system app info
appList.add(tmpInfo);
//把列表插入数据库,LauncherModel loadWorkspace
就能加载了
private long addCustumAppShortcut(SQLiteDatabase db, ContentValues values,
PackageManager packageManager, Intent intent, AppInfo appInfo) {
long id = -1;
String packageName = appInfo.packageN
String className = appInfo.classN
ComponentN
cn = new ComponentName(packageName, className);
info = packageManager.getActivityInfo(cn, 0);
} catch (PackageManager.NameNotFoundException nnfe) {
String[] packages = packageManager.currentToCanonicalPackageNames(
new String[] { packageName });
cn = new ComponentName(packages[0], className);
info = packageManager.getActivityInfo(cn, 0);
id = generateNewId();
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
values.put(Favorites.INTENT, intent.toUri(0));
values.put(Favorites.TITLE, appInfo.appName);
values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_APPLICATION);
values.put(Favorites.SPANX, 1);
values.put(Favorites.SPANY, 1);
values.put(Favorites._ID, generateNewId());
if (dbInsertAndCheck(this, db, TABLE_FAVORITES, null, values) & 0) {
return -1;
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, &Unable to add favorite: & + packageName +
&/& + className, e);
2) 加载ufolder
LauncherModel.java
private void loadWorkspace() {
while (!mStopped && c.moveToNext()) {
int itemType = c.getInt(itemTypeIndex);
switch (itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
case LauncherSettings.Favorites.ITEM_TYPE_UFOLDER:
isUFolder =
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
id = c.getLong(idIndex);
FolderInfo folderInfo = findOrMakeFolder(sFolders, id);
//设置 ufolder 的itemType
// 这里用了个boolean isUFolder 判断,因为好像只有case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
// 才能生成folder.(应该会后更好的解决方法)
if (isUFolder) folderInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_UFOLDER;
folderInfo.title = c.getString(titleIndex);
folderInfo.id =
container = c.getInt(containerIndex);
folderInfo.container =
folderInfo.screen = c.getInt(screenIndex);
folderInfo.cellX = c.getInt(cellXIndex);
folderInfo.cellY = c.getInt(cellYIndex);
// check & update map of what's occupied
if (!checkItemPlacement(occupied, folderInfo)) {
switch (container) {
case LauncherSettings.Favorites.CONTAINER_DESKTOP:
case LauncherSettings.Favorites.CONTAINER_HOTSEAT:
sWorkspaceItems.add(folderInfo);
sItemsIdMap.put(folderInfo.id, folderInfo);
sFolders.put(folderInfo.id, folderInfo);
isUFolder =
3)定义 ufloder 图标
Launcher.java
public void bindItems(ArrayList&ItemInfo& shortcuts, int start, int end) {
setLoadOnResume();
final Workspace workspace = mW
for (int i= i& i++) {
final ItemInfo item = shortcuts.get(i);
// Short circuit if we are loading dock items for a configuration which has no dock
if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT &&
mHotseat == null) {
switch (item.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
View shortcut = createShortcut((ShortcutInfo)item);
workspace.addInScreen(shortcut, item.container, item.screen, item.cellX,
item.cellY, 1, 1, false);
case LauncherSettings.Favorites.ITEM_TYPE_UFOLDER:
//ufolder icon layout ufolder_icon.xml
FolderIcon newUFolder = FolderIcon.fromXml(R.layout.ufolder_icon, this,
(ViewGroup) workspace.getChildAt(workspace.getCurrentPage()),
(FolderInfo) item, mIconCache);
// 就是通过这在workspace中显示folder的
workspace.addInScreen(newUFolder, item.container, item.screen, item.cellX,
item.cellY, 1, 1, false);
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
FolderIcon newFolder = FolderIcon.fromXml(R.layout.folder_icon, this,
(ViewGroup) workspace.getChildAt(workspace.getCurrentPage()),
(FolderInfo) item, mIconCache);
workspace.addInScreen(newFolder, item.container, item.screen, item.cellX,
item.cellY, 1, 1, false);
workspace.requestLayout();
Workspace.java
private void onDropExternal(final int[] touchXY, final Object dragInfo,
final CellLayout cellLayout, boolean insertAtFirst, DragObject d) {
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
if (info.container == NO_ID && info instanceof ApplicationInfo) {
// Came from all apps -- make a copy
info = new ShortcutInfo((ApplicationInfo) info);
view = mLauncher.createShortcut(R.layout.application, cellLayout,
(ShortcutInfo) info);
case LauncherSettings.Favorites.ITEM_TYPE_UFOLDER:
view = FolderIcon.fromXml(R.layout.ufolder_icon, mLauncher, cellLayout,
(FolderInfo) info, mIconCache);
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
(FolderInfo) info, mIconCache);
throw new IllegalStateException(&Unknown item type: & + info.itemType);
===============
2.ufolder 的其他额外功能
1)当自定义的folder,所包含的内容&=1时,不从Launcher界面删除,也不删除数据库的记录
Folder.java
private void replaceFolderWithFinalItem() {
if (mInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_UFOLDER)
ItemInfo finalItem =
if (getItemCount() == 1) {
finalItem = mInfo.contents.get(0);
// Remove the folder completely
CellLayout cellLayout = mLauncher.getCellLayout(mInfo.container, mInfo.screen);
cellLayout.removeView(mFolderIcon);
if (mFolderIcon instanceof DropTarget) {
mDragController.removeDropTarget((DropTarget) mFolderIcon);
mLauncher.removeFolder(mInfo);
if (finalItem != null) {
LauncherModel.addOrMoveItemInDatabase(mLauncher, finalItem, mInfo.container,
mInfo.screen, mInfo.cellX, mInfo.cellY);
LauncherModel.deleteItemFromDatabase(mLauncher, mInfo);
// Add the last remaining child to the workspace in place of the folder
if (finalItem != null) {
View child = mLauncher.createShortcut(R.layout.application, cellLayout,
(ShortcutInfo) finalItem);
mLauncher.getWorkspace().addInScreen(child, mInfo.container, mInfo.screen, mInfo.cellX,
mInfo.cellY, mInfo.spanX, mInfo.spanY);
2).ufolder onDrop 时,不能删除。
在workspace中移动ufolder时,不显示DeleteDropTarget。就是那个 (X Remove) 图标
DeleteDropTarget extends ButtonDropTarget
public void onDragStart(DragSource source, Object info, int dragAction) {
boolean isVisible =
boolean isUninstall =
if (info instanceof FolderInfo) {
FolderInfo folderInfo = (FolderInfo)
if (folderInfo.itemType == 5) {
isVisible =
// 删除对应的DragObject
private void completeDrop(DragObject d) {
ItemInfo item = (ItemInfo) d.dragI
if (isAllAppsApplication(d.dragSource, item)) {
// Uninstall the application if it is being dragged from AppsCustomize
mLauncher.startApplicationUninstallActivity((ApplicationInfo) item);
} else if (isWorkspaceOrFolderApplication(d)) {
LauncherModel.deleteItemFromDatabase(mLauncher, item);
} else if (isWorkspaceFolder(d)) {
// Remove the folder from the workspace and delete the contents from launcher model
FolderInfo folderInfo = (FolderInfo)
mLauncher.removeFolder(folderInfo);
LauncherModel.deleteFolderContentsFromDatabase(mLauncher, folderInfo);
} else if (isWorkspaceOrFolderWidget(d)) {
// Remove the widget from the workspace
mLauncher.removeAppWidget((LauncherAppWidgetInfo) item);
LauncherModel.deleteItemFromDatabase(mLauncher, item);
final LauncherAppWidgetInfo launcherAppWidgetInfo = (LauncherAppWidgetInfo)
final LauncherAppWidgetHost appWidgetHost = mLauncher.getAppWidgetHost();
if (appWidgetHost != null) {
// Deleting an app widget ID is a void call but writes to disk before returning
// to the caller...
new Thread(&deleteAppWidgetId&) {
public void run() {
appWidgetHost.deleteAppWidgetId(launcherAppWidgetInfo.appWidgetId);
}.start();
3).监控app install事件,ufolder 自动添加刚安装的app
Lancher.java
* A package was installed.
* Implementation of the method from LauncherModel.Callbacks.
public void bindAppsAdded(ArrayList&ApplicationInfo& apps) {
setLoadOnResume();
removeDialog(DIALOG_CREATE_SHORTCUT);
mWorkspace.addItems(apps);
if (mAppsCustomizeContent != null) {
mAppsCustomizeContent.addApps(apps);
Workspace.java
void addItems(final ArrayList&ApplicationInfo& apps) {
final ArrayList&ShortcutInfo& addContentInfo = new ArrayList&ShortcutInfo&();
final int appCount = apps.size();
for (int i = 0; i & appC i++) {
addContentInfo.add(apps.get(i).makeShortcut());
ArrayList&CellLayout& cellLayouts = getWorkspaceAndHotseatCellLayouts();
for (final CellLayout layoutParent: cellLayouts) {
final ViewGroup layout = layoutParent.getChildrenLayout();
// Avoid ANRs by treating each screen separately
post(new Runnable() {
public void run() {
final ArrayList&View& childrenToAdd = new ArrayList&View&();
childrenToAdd.clear();
int childCount = layout.getChildCount();
for (int j = 0; j & childC j++) {
final View view = layout.getChildAt(j);
Object tag = view.getTag();
if (tag instanceof FolderInfo) {
final FolderInfo info = (FolderInfo)
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_UFOLDER) {
for (ShortcutInfo appInfo : addContentInfo) {
// add in folder and insert data to database
info.add(appInfo);
===================
其他有关Folder的记录:
1.FolderIcon.java
computePreviewItemDrawingParams()
计算Folder上预览图标的参数,在dispatchDraw()中绘制,默认画三个。
2.两个shortcut拖到一起时会形成个folder
Workspace.java
createUserFolderIfNecessary();
在onDrogOver()中
if (userFolderPending && dragOverView != mLastDragOverView) {
mFolderCreationAlarm.setOnAlarmListener(new
FolderCreationAlarmListener(mDragTargetLayout, mTargetCell[0], mTargetCell[1]));
mFolderCreationAlarm.setAlarm(FOLDER_CREATION_TIMEOUT);
public void onAlarm(Alarm alarm) {
if (mDragFolderRingAnimator == null) {
mDragFolderRingAnimator = new FolderRingAnimator(mLauncher, null);
mDragFolderRingAnimator.setCell(cellX, cellY);
mDragFolderRingAnimator.setCellLayout(layout);
mDragFolderRingAnimator.animateToAcceptState();
Resources res = mLauncher.getResources();
//生成folder的动画
FolderRingAnimator.sSharedInnerRingDrawable = res.getDrawable(R.drawable.portal_ring_inner_holo);
FolderRingAnimator.sSharedOuterRingDrawable = res.getDrawable(R.drawable.portal_ring_outer_holo);
layout.showFolderAccept(mDragFolderRingAnimator);
mCreateUserFolderOnDrop =
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:38049次
排名:千里之外
原创:18篇
转载:10篇
评论:19条
(1)(3)(2)(1)(1)(2)(1)(1)(2)(1)(1)(1)(3)(1)(1)(1)(1)(8)(1)

我要回帖

更多关于 the folder iphone 的文章

 

随机推荐