Hi
I am trying to implement a kind of "animation" in moving a view (added programatically on a service") added to the windowmanager, so according the docs on the windowmanager implement viewManager and can only add,remove or updatelayout the view
http://developer.android.com/reference/android/view/ViewManager.html
all the code is on a sticky service BTW...
I have this code:
If I do not insert the while loop I just see the final result (the view at 1/3 of the screen), but the while make the "animation" so ugly and slow....
any tip
EDIT:
tried with the animation library and does NOTHING either,,,,
I am trying to implement a kind of "animation" in moving a view (added programatically on a service") added to the windowmanager, so according the docs on the windowmanager implement viewManager and can only add,remove or updatelayout the view
http://developer.android.com/reference/android/view/ViewManager.html
all the code is on a sticky service BTW...
I have this code:
B4X:
layoutParameters = r.CreateObject2("android.view.WindowManager$LayoutParams", Array As Object(widthPixels, heightPixels, 0, 0, 2007,8+32+256+262144,-3), Array As String(i, i, i, i, i, i,i))
For i3= heightPixels To heightPixels/3 Step -10
YmoverPanelScreenshot=i3 'deberia ser i3
Log("moviendose con valor: " & YmoverPanelScreenshot)
Dim s As Long = DateTime.Now + 20
Do While DateTime.Now < s
DoEvents
Loop
r.Target=layoutParameters
r.SetField( "height" ,YmoverPanelScreenshot,"java.lang.int")
r.SetField("y",-YmoverPanelScreenshot,"java.lang.int")
Log("los new LP:" &layoutParameters)
r.Target = cwm
r.RunMethod4("updateViewLayout", Array As Object(ScreenShot, layoutParameters ),Array As String("android.view.View", "android.view.ViewGroup$LayoutParams"))
Next
If I do not insert the while loop I just see the final result (the view at 1/3 of the screen), but the while make the "animation" so ugly and slow....
any tip
EDIT:
tried with the animation library and does NOTHING either,,,,
Last edited: