By he minggui (http://blog.csdn.net/hmg25) reprint please indicate the source
The native preview of Android is not very nice. I like HTC very much. I saw that the preview also exists on the ADW, So I extracted it and put it into the native android2.2. If you don't want to talk about it, you can directly view the truth in a diagram:
Native, not modified version: (By HE minggui, please indicate the source)
After modification, like HTC:
The main changes are the workspace. Java and launcher. java files. The accompanying source code only contains these two files.
You only need to overwrite the workspace. Java and launcher. java files at http://download.csdn.net/source/3142047 ~~
The operation is to press the Allapp button at the bottom of the dock ~~
There are too many codes to explain. The source code is the king!
Source code: http://download.csdn.net/source/3142406
Note: thanks to the aaa2832 and whshuai11 kids shoes, one of the bugs found is that when you click a preview window, the desktop icon disappears when you jump back to the original interface, clicking the original window will become stuck. The solution is as follows:
BUG 1: Add the following in onTouchEvent of workspase:
If (mLauncher. isallpolicvisible () | mSensemode)
{
Return true;
}
Public boolean onTouchEvent (MotionEvent ev ){
If (mLauncher. isallpolicvisible () | mSensemode) // add for bug
{
Return true;
}......
BUG 2: The Stuck Problem is actually caused by not refreshing the interface. You only need to add
Else {
MLauncher. dismissPreviews ();
PostInvalidate (); // add for bug
}