6

I need to remove view with rotation using on touch event. My view is not lightweight: it contain a web browser and other elements.

I implemented slide to delete without rotation, and it works not very fast, but it works. After adding the rotation... Very very slowly.

I looking for fast method to remove with rotation.

As I understand, I can to read bitmap from the screen, hide my view and paint this bitmap on canvas. I think, that this method should works fine.

My question is:

  • What library can I use?
  • What about screen rotation (I must to clear canvas, remove my bitmap, restore my view, and reset touch events)?
  • Maybe I can use analog of internal drag and drop? (Hmmm, this is good idea, but how to make fullsize shadow and animate action "moving out of the screen"?)

How do you solve such problems?

Update for Mohammed Ali: I can to read bitmap of my view and draw it on canvas . Opaque shadow for drag and drop, shadow size...

Community
  • 1
  • 1
VKDev
  • 604
  • 7
  • 18
  • 1
    Can you show your current working demo. And post some code please to get some idea. – Mohammed Ali May 29 '15 at 12:34
  • 1
    I think, that demo is not interesting, because current version contain onTouchListener and new positions for my view. You can find many many realisations in google, or write your version in 15 minutes :) In my opinion the version with changing position of the view for this problem is not very good, and is not needed. – VKDev May 29 '15 at 12:46
  • 1
    Have you tried enabling view cache? – snapix Jun 15 '15 at 12:17
  • 1
    I think if you enable drawing cache for children on parent view. It should do what you are trying to achieve inside android system. http://developer.android.com/reference/android/view/ViewGroup.html#setChildrenDrawnWithCacheEnabled(boolean) – snapix Jun 15 '15 at 12:23
  • 1
    And you have to enable cache on child view too.. http://developer.android.com/reference/android/view/View.html#setDrawingCacheEnabled(boolean) – snapix Jun 15 '15 at 12:26

0 Answers0