Android實(shí)現(xiàn)Flip翻轉(zhuǎn)動(dòng)畫效果
本文實(shí)例講述了Android實(shí)現(xiàn)Flip翻轉(zhuǎn)動(dòng)畫效果的方法,分享給大家供大家學(xué)習(xí)借鑒。
具體實(shí)現(xiàn)代碼如下:
LinearLayout locationLL = (LinearLayout) findViewById(R.id.locationLL);
LinearLayout baseLL = (LinearLayout) findViewById(R.id.baseLL);
private void flipit() {
Interpolator accelerator = new AccelerateInterpolator();
Interpolator decelerator = new DecelerateInterpolator();
final LinearLayout visibleList,invisibleList;
final ObjectAnimator visToInvis, invisToVis;
if (locationLL.getVisibility() == View.GONE) {
visibleList = baseLL;
invisibleList = locationLL;
visToInvis = ObjectAnimator.ofFloat(visibleList, "rotationY", 0f, 90f);
invisToVis = ObjectAnimator.ofFloat(invisibleList, "rotationY", -90f, 0f);
} else {
invisibleList = baseLL;
visibleList = locationLL;
visToInvis = ObjectAnimator.ofFloat(visibleList, "rotationY", 0f, -90f);
invisToVis = ObjectAnimator.ofFloat(invisibleList, "rotationY", 90f, 0f);
}
visToInvis.setDuration(300);
invisToVis.setDuration(300);
visToInvis.setInterpolator(accelerator);
invisToVis.setInterpolator(decelerator);
visToInvis.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator anim) {
visibleList.setVisibility(View.GONE);
invisToVis.start();
invisibleList.setVisibility(View.VISIBLE);
}
});
visToInvis.start();
}
希望本文所述實(shí)例對(duì)大家Android程序設(shè)計(jì)能有一定的幫助。
- Android實(shí)現(xiàn)圖片反轉(zhuǎn)、翻轉(zhuǎn)、旋轉(zhuǎn)、放大和縮小
- Android動(dòng)畫之3D翻轉(zhuǎn)效果實(shí)現(xiàn)函數(shù)分析
- Android圖片翻轉(zhuǎn)動(dòng)畫簡(jiǎn)易實(shí)現(xiàn)代碼
- Android實(shí)現(xiàn)文字翻轉(zhuǎn)動(dòng)畫的效果
- android使用FlipAnimation實(shí)現(xiàn)3D垂直翻轉(zhuǎn)動(dòng)畫
- Android實(shí)現(xiàn)3D翻轉(zhuǎn)動(dòng)畫效果
- Android利用Camera實(shí)現(xiàn)中軸3D卡牌翻轉(zhuǎn)效果
- Android實(shí)現(xiàn)卡片翻轉(zhuǎn)動(dòng)畫
- android camera yuv幀水平翻轉(zhuǎn)實(shí)例
- android實(shí)現(xiàn)撲克卡片翻轉(zhuǎn)
相關(guān)文章
詳解 Kotlin Reference Basic Types, String, Array and Imports
這篇文章主要介紹了詳解 Kotlin Reference Basic Types, String, Array and Imports的相關(guān)資料,需要的朋友可以參考下2017-06-06
Android使用SQLite數(shù)據(jù)庫(kù)的示例
本篇文章主要介紹了Android使用SQLite數(shù)據(jù)庫(kù)的示例,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-01-01
Android自定義可循環(huán)的滾動(dòng)選擇器CycleWheelView
Android自定義可循環(huán)的滾動(dòng)選擇器CycleWheelView替代TimePicker/NumberPicker/WheelView,很實(shí)用的一篇文章分享給大家,感興趣的小伙伴們可以參考一下2016-07-07
Android數(shù)據(jù)加密之SHA安全散列算法
這篇文章主要為大家詳細(xì)介紹了Android數(shù)據(jù)加密之SHA安全散列算法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-09-09
android 使用XStream解析xml的實(shí)例
下面小編就為大家分享一篇android 使用XStream解析xml的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-01-01
Android仿Iphone屏幕底部彈出半透明PopupWindow效果
這篇文章主要為大家詳細(xì)介紹了Android仿Iphone屏幕底部彈出半透明PopupWindow效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-07-07
Android下Button實(shí)現(xiàn)圖文混排效果
這篇文章主要為大家詳細(xì)介紹了Android下Button實(shí)現(xiàn)圖文混排效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-08-08
Android編程之Activity中onDestroy()調(diào)用分析
這篇文章主要介紹了Android編程之Activity中onDestroy()調(diào)用方法,針對(duì)onDestroy引起的內(nèi)存泄露及解決方法進(jìn)行了分析,并給出了解決方案,需要的朋友可以參考下2015-12-12
android控件實(shí)現(xiàn)多張圖片漸變切換
這篇文章主要為大家詳細(xì)介紹了android控件實(shí)現(xiàn)多張圖片漸變切換,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-08-08
Flutter開發(fā)之路由與導(dǎo)航的實(shí)現(xiàn)
這篇文章主要介紹了Flutter開發(fā)之路由與導(dǎo)航的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-12-12

