日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
模擬優(yōu)酷像關(guān)電視一樣的退出效果

其實(shí)所謂像關(guān)電視一樣的退出效果就是一個動畫而已,好吧,看到這里的朋友可以先自己想想,其實(shí)思路是很簡單的。

1.要求屏幕瞬間白屏。

2.白色屏幕以勻加速或勻減速向中間擠壓,直至一條白線后消失不見,整個過程大概200毫秒。

3.露出黑漆漆一片的黑色背景。

首先,布局文件的寫法。有很多種,最簡單的就是利用RelativeLayout或者FrameLayout為應(yīng)用首界面的根布局,如果應(yīng)用的背景色本身為黑色最好,就像優(yōu)酷一樣。如果應(yīng)用的背景色不為黑色,那么在根布局里寫一:

 
 
  1.       Android:id="@+id/fl_off" 
  2.         android:layout_width="fill_parent" 
  3.         android:layout_height="fill_parent" 
  4.         android:visibility="gone" 
  5.          > 
  6.     
  7.         android:layout_width="fill_parent" 
  8.         android:layout_height="fill_parent" 
  9.         android:background="@color/text_black" /> 
  10.     
  11.           android:id="@+id/iv_off" 
  12.         android:layout_width="fill_parent" 
  13.         android:layout_height="fill_parent" 
  14.         android:background="@color/text_white"  
  15.          android:visibility="gone"/> 
  16.  

第一個ImageView為黑色的背景色,第二個為白色的背景色。

下面是動畫文件的寫法 res/anim/tv_off.xml:

 
 
  1.  
  2. android:zAdjustment="top" 
  3.   xmlns:android="http://schemas.android.com/apk/res/android">
  4.  
  5. android:duration="200" 
  6. android:pivotX="50.0%" 
  7. android:pivotY="50.0%" 
  8. android:fromXScale="1.0" 
  9. android:toXScale="1.0" 
  10. android:fromYScale="1.0" 
  11. android:toYScale="0.0030" /> 
  12.     
  13. android:duration="200" 
  14. android:pivotX="50.0%" 
  15. android:pivotY="50.0%" 
  16. android:startOffset="200" 
  17. android:fromXScale="1.0" 
  18. android:toXScale="0.0" 
  19. android:fromYScale="1.0" 
  20. android:toYScale="0.3" /> 
  21.     
  22. android:duration="400" 
  23. android:fillAfter="true" 
  24. android:fromAlpha="1.0" 
  25. android:toAlpha="0.0" 
  26. android:fillEnabled="true" /> 
  27.  

這個很簡單,大家copy就行了。

因?yàn)閯赢嬕玫搅思铀倨鳎旅媸羌铀倨魑募膶懛?res/interpolator/accelerate_quint.xml:

 
 
  1.  
  2.   xmlns:android="http://schemas.android.com/apk/res/android" /> 

這是一個勻加速的加速器,加速倍數(shù)為2.5。


當(dāng)前題目:模擬優(yōu)酷像關(guān)電視一樣的退出效果
鏈接URL:http://www.5511xx.com/article/dhjhipd.html