tufanv Expert Licensed User Longtime User Mar 11, 2018 #1 Hello, I am trying to rotate a bitmap with using sleep. I have loaded a bitmap and set it to a imageview. Every 10 ms I want to rotate the image 1 degress. It should be quite easy but I dont think this is correct. It crashes after some seconds , I think I mustnt load the bitmap to imageview with every loop. What is the correct way to do this ? Code: Copy For i=0 To 100 bmp=bmp.Rotate(i) imgcark.Bitmap=bmp Sleep(10) Next ty
Hello, I am trying to rotate a bitmap with using sleep. I have loaded a bitmap and set it to a imageview. Every 10 ms I want to rotate the image 1 degress. It should be quite easy but I dont think this is correct. It crashes after some seconds , I think I mustnt load the bitmap to imageview with every loop. What is the correct way to do this ? Code: Copy For i=0 To 100 bmp=bmp.Rotate(i) imgcark.Bitmap=bmp Sleep(10) Next ty
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2018 #2 Code: Copy Dim xview As B4XView = imgcark 'iXUI library xview.SetRotationAnimated(1000, 180) Upvote 0