第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

淺談Android動畫

難度中級
時長31分
學(xué)習(xí)人數(shù)
綜合評分9.60
146人評價 查看評價
9.8 內(nèi)容實(shí)用
9.5 簡潔易懂
9.5 邏輯清晰
  • 逐幀動畫“FrameAnimation” 1. 在Drawable文件夾下定義animation-list.xml <animation-list xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 按順序排列 drawable指定一張圖片 duration指定每張圖片停留的時間 --> <item android:drawable="@drawable/one" android:duration="500"/> <item android:drawable="@drawable/six" android:duration="500"/> <item android:drawable="@drawable/three" android:duration="500"/> <item android:drawable="@drawable/two" android:duration="500"/> </animation-list> 2.為ImageView設(shè)置資源 mImageView.setImageResource(R.drawable.anim_list); //設(shè)置圖片資源即可。
    查看全部
  • 布局動畫“舉例,listView使用LayoutAnimation” Animation animation=AnimationUtils.loadAnimation(this, R.anim.zoom_in); LayoutAnimationController controller=new LayoutAnimationController(animation); controller.setOrder(LayoutAnimationController.ORDER_NORMAL);//設(shè)置顯示順序,具體看源碼 listView.setLayoutAnimation(controller);//將控制器設(shè)置給listView listView.startLayoutAnimation();//開始布局動畫
    查看全部
  • 組合動畫四“Activity切換時的動畫” Intent intent=new Intent(MainActivity.this, SecondActivity.class); startActivity(intent); //注意:要在startActivity之后使用overridePendingTransition,否則無效 overridePendingTransition(R.anim.zoom_in, R.anim.zoom_out);//分別是進(jìn)入時的動畫,和退出時的動畫
    查看全部
  • 組合動畫“使用設(shè)置重復(fù),來進(jìn)行動畫重復(fù)播放?!?AlphaAnimation alphaAnimation=new AlphaAnimation(0.1f, 1f);//使用代碼動態(tài)增加動畫。 alphaAnimation.setDuration(1000); alphaAnimation.setRepeatCount(2); //設(shè)置重復(fù)次數(shù) alphaAnimation.setRepeatMode(Animation.REVERSE); //reverse代表倒序重復(fù),restart表示正序重復(fù) mImageView.startAnimation(alphaAnimation); 其中,reverse和restart。 /** * When the animation reaches the end and the repeat count is INFINTE_REPEAT * or a positive value, the animation restarts from the beginning. */ public static final int RESTART = 1; /** * When the animation reaches the end and the repeat count is INFINTE_REPEAT * or a positive value, the animation plays backward (and then forward again). */ public static final int REVERSE = 2;
    查看全部
  • 組合動畫二“在xml文件中配置連續(xù)動畫” <set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 漸變動畫,表示從透明度10%到100%,持續(xù)時間為1秒 --> <alpha android:fromAlpha="0.1" android:toAlpha="1" android:duration="1000" > </alpha> <!-- *在一個文件中定義兩個動畫,則兩個動畫都會執(zhí)行 *android:startOffset="1000" 動畫延遲執(zhí)行的毫秒數(shù)。此時表示動畫在1s之后執(zhí)行。配合上面的動畫實(shí)現(xiàn)動畫連續(xù)播放效果。 --> <alpha android:fromAlpha="1" android:toAlpha="0.1" android:startOffset="1000" android:duration="1000" > </alpha> </set>
    查看全部
  • 組合動畫一“使用動畫監(jiān)聽器實(shí)現(xiàn)” animation=AnimationUtils.loadAnimation(this, R.anim.alpha); mImageView.startAnimation(animation); animation.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { animation=AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate); mImageView.startAnimation(animation); } });
    查看全部
  • RotateAnimation(旋轉(zhuǎn)動畫) <set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- android:fromDegrees="0" 表示從0度開始旋轉(zhuǎn) android:toDegrees="-720" 表示“逆時針”旋轉(zhuǎn)兩圈(720度),如果是“+720”,則為順時針旋轉(zhuǎn)720度 --> <rotate android:fromDegrees="0" android:toDegrees="-720" android:pivotX="0" android:pivotY="0" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:duration="2000" > </rotate> </set>
    查看全部
  • TranslateAnimation(位移動畫) <set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- android:fromXDelta="0" //表示從x哪個位置開始,如果是0,就是當(dāng)前位置 android:toXDelta="100" //表示到x哪個位置結(jié)束 Delta 【數(shù)學(xué)】(變量的)增量 --> <translate android:fromXDelta="0" android:toXDelta="100" android:fromYDelta="0" android:toYDelta="100" android:duration="1000" ></translate> </set>
    查看全部
  • ScaleAnimation(縮放動畫) xml文件 <set xmlns:android="http://schemas.android.com/apk/res/android" > <!-- interpolator //插入器,比如這個設(shè)置是先加速,后減速。 android:pivotX="0.1" 設(shè)置錨點(diǎn)x的坐標(biāo)。表示從該坐標(biāo)開始放大 --> <scale android:duration="1000" android:fromXScale="1" android:fromYScale="0.1" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:pivotX="0.1" android:pivotY="50%" android:toXScale="1.0" android:toYScale="1.0" > </scale> </set>
    查看全部
  • AlphaAnimation(透明動畫) 1.xml文件 <set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 漸變動畫,表示從透明度10%到100%,持續(xù)時間為1秒 --> <alpha android:fromAlpha="0.1" android:toAlpha="1" android:duration="1000" > </alpha> </set> 2.代碼 Animation animation;//動畫對象 animation=AnimationUtils.loadAnimation(this, R.anim.alpha); //將動畫加載進(jìn)來 mImageView.startAnimation(animation);//imageView開始動畫,參數(shù)為設(shè)置好的動畫
    查看全部
  • 動畫-19
    查看全部
  • 動畫-18
    查看全部
  • 動畫-17
    查看全部
  • 動畫-16
    查看全部
  • 動畫-15
    查看全部

舉報

0/150
提交
取消
課程須知
本課程為基礎(chǔ)課程: 1.基本掌握Android基礎(chǔ)相關(guān)知識。 2.熟練掌握布局文件xml的使用 3.靈活應(yīng)用xml中各個屬性的用途
老師告訴你能學(xué)到什么?
1.動畫效果概覽 2.四種基礎(chǔ)動畫實(shí)現(xiàn) 3.各種特效實(shí)例的實(shí)現(xiàn)

微信掃碼,參與3人拼團(tuán)

微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復(fù)購買,感謝您對慕課網(wǎng)的支持!