Android Question Not understand problem with Setlayoutanimated

Fillmore

Member
Licensed User
Longtime User
Hi,

I've got a problem with my animation...
After clic start, when I clic Tap, my image goes on the right way, but if i tap again, it comes back outside of the screen...
I certainely done something wrong, but I don't know what.

If somebody have got an idea....

Thanks a lot.

FM
 

Attachments

  • rfpbad.zip
    93.9 KB · Views: 129
Last edited:

Fillmore

Member
Licensed User
Longtime User
Thank you Erel,

You'll see an image if you click on "Démarrer le Test" Button.
You'll see a badminton shuttle. It moves when you click on "TAP" button. The problem is when moving to the left.

Have a good day !

Fred
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
I think this works as you wish .. But I don't understand what is causing the issue.

Removing Sleep(300) fixes it .. but I think its more to do with setPivot ? I have not familiar with this , so don't understand well.

I have cleaned / simplified the sample so others might have a look.

* Running the commented Sleep(300) will show the problem .. Just hit the large Tap Button
 

Attachments

  • rfp Sample.zip
    79 KB · Views: 146
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is what I see when I run your program:

SS-2017-12-06_08.35.50.png


Anyway, I recommend you to remove setRotation and setPivot and instead use B4XView.SetRotationAnimated.
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
? .. I obviously cleaned it up 2 much . I cannot get it to display properly either :confused:
 
Upvote 0

Fillmore

Member
Licensed User
Longtime User
Hi MangoJack and Erel,

Sorry, I was busy yesterday.
Thanks a lot for your answers. In deed, the shuttle fly on the right way now :)
I'll also try with the XUI library. It seems more simple.

Thanks again for the daily work !

Fred


PS : sorry if my english isn't very good...
 
Upvote 0
Top