All Projects → luhaoaimama1 → LollipopTransition

luhaoaimama1 / LollipopTransition

Licence: other
关于共享元素与transition框架的学习

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to LollipopTransition

Atgmediabrowser
Image slide-show viewer with multiple predefined transition styles, with ability to create new transitions with ease.
Stars: ✭ 186 (+520%)
Mutual labels:  transition
Anix
🐿 Super easy and lightweight(<3kb) JavaScript animation library
Stars: ✭ 239 (+696.67%)
Mutual labels:  transition
react-router-v4-transition
React Router V4 Transition
Stars: ✭ 40 (+33.33%)
Mutual labels:  transition
Droidmotion
🏂 Implementation of a simple android motion
Stars: ✭ 200 (+566.67%)
Mutual labels:  transition
Transition
Easy interactive interruptible custom ViewController transitions
Stars: ✭ 2,566 (+8453.33%)
Mutual labels:  transition
Lsyevernote
Stars: ✭ 248 (+726.67%)
Mutual labels:  transition
Transitioner
A library for dynamic view-to-view transitions
Stars: ✭ 2,049 (+6730%)
Mutual labels:  transition
use-spring
Hooke's law hook
Stars: ✭ 53 (+76.67%)
Mutual labels:  transition
Zfdragablemodaltransition
Custom animation transition for present modal view controller
Stars: ✭ 2,485 (+8183.33%)
Mutual labels:  transition
Editly
Slick, declarative command line video editing & API
Stars: ✭ 3,162 (+10440%)
Mutual labels:  transition
Visualizer
UI-Router state visualizer and transition visualizer
Stars: ✭ 205 (+583.33%)
Mutual labels:  transition
Spstorkcontroller
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,494 (+8213.33%)
Mutual labels:  transition
Ailight
AiLight is a custom firmware for the esp8266 based Ai-Thinker (or equivalent) RGBW WiFi light bulbs
Stars: ✭ 248 (+726.67%)
Mutual labels:  transition
Decktransition
A library to recreate the iOS Apple Music now playing transition
Stars: ✭ 2,207 (+7256.67%)
Mutual labels:  transition
jazzer
Add some visual smooth jazz to your page
Stars: ✭ 19 (-36.67%)
Mutual labels:  transition
Cssanimation.io
CSS Animation Library for Developers and Ninjas
Stars: ✭ 176 (+486.67%)
Mutual labels:  transition
Presentr
iOS let's you modally present any view controller, but if you want the presented view controller to not cover the whole screen or modify anything about its presentation or transition you have to use the Custom View Controller Presentation API's.
Stars: ✭ 2,816 (+9286.67%)
Mutual labels:  transition
preact-transitioning
Preact components for easily implementing basic CSS animations and transitions
Stars: ✭ 35 (+16.67%)
Mutual labels:  transition
minimal-player
This is a minimal, clean audio/music/mp3 player with spinning cover images, built with jQuery, TweenMax.js and SVG images.
Stars: ✭ 48 (+60%)
Mutual labels:  transition
Fluidtransitions
Fluid Transitions for React Navigation
Stars: ✭ 2,814 (+9280%)
Mutual labels:  transition

Transition框架的总结

JicPack

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Step 2. Add the dependency

compile 'com.github.luhaoaimama1:LollipopTransition:Latest release'

#Demo演示 视频链接地址 ##配置阶段

public class BaseActivity extends AppCompatActivity {
    @Override
    public void onActivityReenter(int resultCode, Intent data) {
        super.onActivityReenter(resultCode, data);
        ShareTransition.onActivityReenter(this,resultCode,data);
    }

    @Override
    protected void onDestroy() {
        ShareTransition.destory(this);
        super.onDestroy();
    }

    @Override
    public void finishAfterTransition() {
        ShareTransition.finishAfterTransition(this);
        super.finishAfterTransition();
    }
}

##5.0Activity动画 5.0动画跳转的特殊方式;

主要是准备场景Scene

  ShareTransition.from(this)
                 .go(new Intent(this, FiveContentAcitivity.class).putExtra("flag", flag));

设置5.0Acvitity动画

  NormalTransition.activityAnimation(this)
                         .enterTransition(new Slide(Gravity.LEFT))
                         .returnTransition(new Slide(Gravity.RIGHT));
                       //.enterTransition(R.transition.content_explore);

##共享动画

流程图 Tips:MapSharedElementsCallback 共享动画执行之前最后走的;

####1.普通的共享动画使用; 第一个Activity

 ShareTransition.from(this)
                .pairs(findViewById(R.id.iv),findViewById(R.id.bg))
                //.pairs(R.id.iv,R.id.bg) ids的形式
                .go(new Intent(this,FiveShareNormal2_LibAcitivty.class));

第二个Activity

 ShareTransition.to(this)
            .setContentView(R.layout.activity_share_normal2)
            .pairs(R.id.iv, R.id.bg)
            .show();

####2.list与Activity(ViewPager可切换)使用的范例 demo里有;

 ShareTransition.from(FiveShareList_LibAcitivty.this)
                .pairs(view.findViewById(R.id.ivv))
                .onMapSharedElements(new MapSharedElementsCallback() {
                    @Override
                    public void onMapSharedElements(List<String> names, Map<String, View> sharedElements, Parent parent) {
                        ...
                    }
                })
                .go(intent)
                .back(new From.PrepareCallback() {
                    @Override
                    public void prepare(int resultCode, Intent data, final Prepare prepare) {
                                 ...
                                prepare.prepareOK();
                            }
                        });
                    }
                });

第二个Activity

 ShareTransition.to(this)
                .setContentView(R.layout.activity_sharepic)
                .onMapSharedElements(new MapSharedElementsCallback() {
                    @Override
                    public void onMapSharedElements(List<String> names, Map<String, View> sharedElements, Parent parent) {
                          ...
                       }
                })
                .show(new To.PrepareCallback() {
                    @Override
                    public void prepare(Prepare prepare) {
                            ...
                           prepare.prepareOK();
                    }
                })
                .back(new To.BackCallBack() {
                    @Override
                    public void setResult(Back mBack) {
                        mBack.setResult(233, new Intent().putExtra("position", vpHelper.getCurrentPostion()));
                    }
                });
        //上边相当于setContent
        ButterKnife.bind(this);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].