(7) Launcher3 customization: After modifying the single screen, the system reports an error when you delete the Hotseat drag application. launcher3hotseat

Source: Internet
Author: User

(7) Launcher3 customization: After modifying the single screen, the system reports an error when you delete the Hotseat drag application. launcher3hotseat

After modifying the single screen, drag the icon in the workspace and release it on the delete button, an error is reported.

The dragged icon cannot be displayed again.

Triggered when dragging and releasing a hand

Public void onDropCompleted (final View target, final DragObject d, final boolean isFlingToDelete, final boolean success) {if (mDeferDropAfterUninstall) {// re-call mDeferredAction = new Runnable () {public void run () {onDropCompleted (target, d, isFlingToDelete, success) If you want to uninstall the software ); mDeferredAction = null ;}}; return ;}boolean beingCalledAfterUninstall = mDeferredAction! = Null; if (success &&! (BeingCalledAfterUninstall &&! MUninstallSuccessful) {if (target! = This & mDragInfo! = Null) {CellLayout parentCell = getParentCellLayoutForView (mDragInfo. cell); if (parentCell! = Null) {parentCell. removeView (mDragInfo. cell);} if (mDragInfo. cell instanceof DropTarget) {mDragController. removeDropTarget (DropTarget) mDragInfo. cell);} // If we move the item to anything not on the Workspace, check if any empty // screens need to be removed. if we dropped back on the workspace, this will // be done post drop animation. stripEmptyScreens () ;}} else if (mDragInfo! = Null & target! = Null &&(! (Target instanceof InfoDropTarget) {CellLayout cellLayout; if (mLauncher. isHotseatLayout (target) {cellLayout = mLauncher. getHotseat (). getLayout ();} else {cellLayout = getScreenWithId (mDragInfo. screenId);} // if (cellLayout = null) {// throw new RuntimeException ("Invalid state: cellLayout = null in" // + "Workspace # onDropCompleted. please file a bug. "); //} Add these two sentences here to fix this BUG if (cellLayout! = Null) {cellLayout. onDropChild (mDragInfo. cell);} if (mDragInfo. cell! = Null) {<span style = "white-space: pre"> </span> mDragInfo. cell. setVisibility (VISIBLE) ;}} if (d. canceled | target instanceof InfoDropTarget | (beingCalledAfterUninstall &&! MUninstallSuccessful) & mDragInfo. cell! = Null) {mDragInfo. cell. setVisibility (VISIBLE);} mDragOutline = null; mDragInfo = null ;}
 



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.