課程
/移動開發(fā)
/Android
/Android屬性動畫賞析
請問下老師,如果我要執(zhí)行X軸平移200,然后Y軸下移200,然后再X軸平移200怎么寫呢?
2017-12-19
源自:Android屬性動畫賞析 1-3
正在回答
//報(bào)歉驗(yàn)證了一下發(fā)現(xiàn)出錯(cuò),重改了一下: ObjectAnimator?animator1?=?ObjectAnimator.ofFloat(mImage,"translationX",0F,200F); ObjectAnimator?animator2?=?ObjectAnimator.ofFloat(mImage,"translationY",0F,200F); ObjectAnimator?animator3?=?ObjectAnimator.ofFloat(mImage,"translationY",200F,400F); ? AnimatorSet?set?=?new?AnimatorSet(); set.setDuration(500); set.palySequentially(animator1,animator2,animator3); set.start();
ObjectAnimator?animator1?=?ObjectAnimator.ofFloat(mImage,"translationX",0F,200F); ObjectAnimator?animator2?=?ObjectAnimator.ofFloat(mImage,"translationY",0F,200F); AnimatorSet?set?=?new?AnimatorSet(); set.setDuration(500); set.palySequentially(animator1,animator2,animator1); set.start();
舉報(bào)
本次課程,將向你介紹如何使用屬性動畫做出更好的動畫
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2018-01-07
2018-01-07