I use the link example, after rotating custom view I try to move it but it disappears.
www.b4x.com
Classes are soon coming...
Basic4android v2.00 will include support for classes. Classes are like templates which you can use to instantiate many objects. Users who are used to object oriented programming will sure find it easier to develop and maintain large projects using classes. Classes are also useful for creating...

B4X:
Public Sub CrearView(xPanel As B4XView, Height As Int, Width As Int, Top As Int, Left As Int)
mLeft = Left
mTop = Top
mWidth = Width
mHeight = Height
xBase = xui.CreatePanel("xBase")
xBase.Color = xui.Color_White
Tag = xBase.Tag
xBase.Tag = Me
xPanel.AddView(xBase, mLeft, mTop, mWidth, mHeight)
imgv.Initialize("")
xBase.AddView(imgv, 0, 0, mWidth, mHeight)
imgv.Bitmap = LoadBitmap(File.DirAssets, "img.png")
innerView = xBase
ACTION_DOWN = xBase.TOUCH_ACTION_DOWN
ACTION_MOVE = xBase.TOUCH_ACTION_MOVE
ACTION_UP = xBase.TOUCH_ACTION_UP
Dim r As Reflector
r.Target = xBase
r.SetOnTouchListener("Panel1_Touch")
End Sub
Public Sub Rotation(Angle As Int)
xBase.Rotation = xBase.Rotation + Angle
End Sub
Private Sub Panel1_Touch (o As Object, ACTION As Int, x As Float, y As Float, motion As Object) As Boolean
If ACTION = ACTION_DOWN Then
downx = x
downy = y
Else
innerView.Left = innerView.Left + x - downx
innerView.Top = innerView.Top + y - downy
xBase.Left = innerView.Left
xBase.Top = innerView.Top
End If
Return True
End Sub