I am creating an app where you will be able to drag clothing items from the right-hand side of the screen (custom SurfaceView 1) onto a human figure on the left-hand side of the screen (custom SurfaceView 2)
I've made great progress in drawing the images where I want them initially, in each view and I've got the dragging functionality sorted...within each view
Where I am stuck is that I can't drag an image out of it's parent view, because obviously it goes outside the Canvas bounds.
The two views are extensions of SurfaceView and are in their own RelativeLayouts inside a top-level RelativeLayout.
My layout is:
- Code: Select all
<dynamically added custom SurfaceView1>
<dynamically added custom SurfaceView2>
<Button> //six buttons
What I need to know is can I draw otuside the Canvas of a SurfaceView, or, what other possible approaches are there to the functionality I describe? Can the Canvas of my custome SurfaceView 1 be expanded to the full size of the screen, or somehow incorporate the Canvas of custome SurfaceView 2? There are other TextView and Button items on the screen that I don't want to draw over, which complicates matters further. (I do want the dragged clothing items to quite happily pass over the top of other screen elements, however...naturalyl).
I'm an absolute Android beginner and was really proud of how far I'd got by myself...until I tried dragging an image out of one of my custom SurfaceViews and it vanished...then the scale of my problem sank in.
I hope some of the experts here see this badly described and rambling problem as a challenge?