If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to animate a button with Timeline?

Hello!

I want to animate a button. I want to make it change its position after clicking on it. I wrote such code, but it does not work. In this case, no errors appear in the console. The button simply does not respond to pressing.

Re: How to animate a button with Timeline?

I think the button in some layout that takes care of positioning. If you modify layoutX this means during the next layout pass the Button is simply put back "where it belongs" by the parent layout.

If you want to move the Button, you should choose a different layout as parent or use the translateX property instead. translateX moves the Button relative to the position where the parent layout places it (layoutX).

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.