2013-08-27 25 views
0

動畫是TextView從屏幕中心移動到其位置,同時尺寸從零變爲正常。 我已經知道使用TranslateAnimationScaleAnimation,但我不知道確定poist,所以我不能讓它從中心移動到它的位置。 我做什麼?如何使TextView從屏幕中心移動到Android中的位置

TranslateAnimation translate = new TranslateAnimation(0,(mWidth/2)- strSize/2, 0, ((mHeight/2) - strHeigth)); 
strHeigth: the TextView heigth; 
strSize : the TextView width 
mWidth : the screen width; 
mHeight : the screeen heigth 

回答

0
TranslateAnimation translate = new TranslateAnimation((mWidth/2)- strSize/2, 
0, 
(mHeight/2) - strHeigth, 
0); 

與此代碼嘗試翻譯阿尼姆

+0

我已經試過了,但沒有成功 – HeyNine

+0

究竟是什麼,你所遇到的問題 – abc

相關問題