TextSurface icon indicating copy to clipboard operation
TextSurface copied to clipboard

sample not play in the center of screen

Open Coder-DanielHan opened this issue 9 years ago • 5 comments

qq 20151019233212

Coder-DanielHan avatar Oct 19 '15 15:10 Coder-DanielHan

@Coder-DanielHan It seems your screenshot shows not initial state of the sample animation. Which one of the words is not is the center?

elevenetc avatar Oct 21 '15 15:10 elevenetc

My screenshot is the end of the sample animation.Which function determines the relative position of the Text to the screen.I noticed that you setPosition to the textDaai,but it's not working? qq 20151027111907

Coder-DanielHan avatar Oct 27 '15 03:10 Coder-DanielHan

It's working. TextBuilder creates initial state of objects(Texts). So at the beginning of animation textDaai locates in the center of screen. And for example textBraAnies instance locates at the bottom of textDaai:

///...
.setPosition(Align.BOTTOM_OF, textDaai).build()

Then you translate canvas/surface by creating animation:

new TransSurface(500, textBraAnies, Pivot.CENTER)

elevenetc avatar Oct 28 '15 14:10 elevenetc

But in my genymotion,at the beginning of the animation,textDaai is out of the screen.And then it moves from the right-bottom corner.

Coder-DanielHan avatar Oct 30 '15 06:10 Coder-DanielHan

How can I set default gravity as left? I don't want the text to be in centre?

AniketBito avatar Aug 01 '17 06:08 AniketBito