Code Monkey home page Code Monkey logo

material-animations's Issues

How to keep underling Activity visible until enter animation completes

Say I have Activity A and activity B. B has 'slide' set as the enter animation.
I would like to slide B on top of A where A will remain untouched until animation completes and B is completely visible.
Is that possible at all? In reality, when I try to do it Activity A disappears which leaves a blank screen and on top of that blank screen Activity B slides in

colorTint

@lgvalle i use "@BindingAdapter("android:colorTint")" and "android:colorTint"
image

the result is the ImageView can`t change color.

custom transitioning view

I have a view that has a button,and 4 imageview. I want the 4 imageviews do Explode transition but I dont want the button do Explode. how to do ?
I have a doubt that the below code need to set before setContentView.
getWindow().setExitTransition(mExplode);
but after setContentView, I get the view id.
then use this code to setTransition.
mExplode.addTarget(mImgRl);
hope your reply !
sincerely

Crashes on pre-Lollipop

Hi,
I am trying to run your project on a JellyBean emulator, and it crashes with

java.lang.NoClassDefFoundError: android.transition.Explode

My question is, is it possible to make this stuff run on pre-Lollipop devices?

about @BindingAdapter

I have an issue about "@BindingAdapter".
In project,has a line as "@BindingAdapter("bind:colorTint")",and every time I build the project AS would throw a wrong like "Error:(23, 24) ่ญฆๅ‘Š: Application namespace for attribute bind:colorTint will be ignored".
Although the project can run,but I am not happy with it.
So I change that line code to "@BindingAdapter("android:colorTint")",then change "app:colorTint" to "android:colorTint".or just change "@BindingAdapter("bind:colorTint")" to "@BindingAdapter("colorTint")",now AS never throw that wrong again.
Could you tell me why?

Swapped code examples

For the "Circular Reveal from the middle of target view" and "Circular Reveal from top of target view + animations" examples towards the bottom of the guide, it looks like someone accidentally swapped the lines for calculating the int "cy" variable.

"Circular Reveal from the middle of target view" -> int cy = viewRoot.getTop();

"Circular Reveal from top of target view + animations" -> int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;

addSharedElement not work when using `add`

                Fragment fragment = ViewerFragment.newInstance(diary.getPhotoUrl());
                fragment.setSharedElementEnterTransition(new ChangeBounds());
                getFragmentManager().beginTransaction()
                        .hide(this)//either using hide or not won't work
                        .add(R.id.container, fragment)// it work when using replace 
                        .addToBackStack("")
                        .addSharedElement(attachPicture, attachPicture.getTransitionName())
                        .commit();

Could you tell me why is that? Because I read the document of addSharedElement, it says:

Used with custom Transitions to map a View from a removed or hidden Fragment to a View from a shown or added Fragment.

Not working with support library

I am trying to use shared element animation in my project and I am using support library for fragments.
I tried the same procedure to add shared element animation but it is not working.
I tested the code on Android 6.0

Incompatible types

If I write this code like tutorial:
Fade fade = TransitionInflater.from(this).inflateTransition(R.transition.activity_fade); getWindow().setEnterTransition(fade);

Androd give me Incompatible types. So I tried:
Transition fade = TransitionInflater.from(this).inflateTransition(R.transition.activity_fade);
getWindow().setEnterTransition(fade);

and same for Activity B. This dont generate error, but it doesn't work

Explode as exit transition

Hi!
In example You show explode transition as enter transition, but reverse transition is slide.
How I can set explode transition as return or exit?
When I call setExitTransition(explodeTransition) or setReturnTransition(explodeTransition) it not take any effect. I want explode as exit or return transition (up part slide up and down screen part slide down), reverse as enter.

Thank You!

Can't include this with a line of gradle?

I just want to try it out without having to haul in so much code by myself, would appreciate if I could do that if it was a one-liner to do so, just like all the android libs out there. Great work by the way, it looks very ..rigorous :)

Not Working!!

I'm doing this,it is not working for me,any pointers guys

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setEnterTransition();
        setExitTransition();
      
    }

    @TargetApi(21)
    private void setEnterTransition(){

        Fade fade_transition = new Fade();
        fade_transition.setDuration(1000);
        getWindow().setEnterTransition(fade_transition);
    }

    @TargetApi(21)
    private void setExitTransition(){

        Slide slide_transition = new Slide();
        slide_transition.setDuration(1000);
        getWindow().setExitTransition(slide_transition);
    }

How do you implement Shared elements between Activities when using an ListView with images.

I have a ListView with a custom adapter that loads images and text. How would I be able to utilize the "Shared elements between Activities" when clicking on each of the items? I'm confused because if you click on an item, then set the transition effect to animate the ImageView, won't all of the images be animated rather than the one that corresponds with the item row you have clicked?

If you could give an example, that would be extremely helpful. Thank you.

DetailActivity3 enterTransition and returnTransition Listeners.

Hello,
First of all, thanks for this useful code!
I've found that the listeners set to enterTransition and returnTransition in DetailActivity3#setupEnterAnimations() and DetailActivity3#setupExitAnimations() are both called when DetailActivity3 starts and also when back is pressed.
In fact, returnTransition is called first.
Using your layout no problem were observed, but using a different layout (more complex) or concatenating different effects may cause problems, for example when setting the visibility/invisibility of the child views.
The only solution I've found is to call setupExitAnimations() when enterTransition ends:

        final Transition enterTransition = getWindow().getSharedElementEnterTransition();
        enterTransition.addListener(new Transition.TransitionListener() {
            ...
            @Override
            public void onTransitionEnd(Transition transition) {
                animateRevealShow(bgViewGroup);
                enterTransition.removeListener(this);
                setupExitAnimations();
            }
            ...
        });

Have you ever faced this situation?

ShareElement circle to Square

i am tring to make transition ShareElement circle to Square like whatsapp but its not going as well. Could you provide demo for that?

supported versions

I'm so sorry for this quastion. Which android versions supported? Is it work fine on lower version such as 4 ?

Thanks

why my Transitions between Activities not work?

I do it it like this in my BasicActivity onCreate():

getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
setupWindowAnimations();
super.setContentView(R.layout.layout_base);
setContentView(getContentViewID());

My setupWindowAnimations() function like this:
protected void setupWindowAnimations() {
L.i("setupWindowAnimations");
Slide slide = (Slide) TransitionInflater.from(this).inflateTransition(R.transition.activity_slide_out);
Fade fade = (Fade) TransitionInflater.from(this).inflateTransition(R.transition.activity_fade_in);
getWindow().setEnterTransition(slide);
getWindow().setExitTransition(fade);
}

when I call startActivity(A,B), the animations not worked.Can u help me? Thanks a lot!

After entry Activity

Can someone tell me why I went into an activity where the background color was the same as the ball color?

Erros with Android 6

Whrn i Prove thsi transcations with Android 6 I have a problem whrn back to activity A(with stat activity again, not with back button) I can't touch anything I have thsi warning n=0, id[0]=0, x[0]=827.0, y[0]=1133.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=303259760, downTime=303259642, deviceId=4, source=0x1002 }
12-09 16:28:18.831 6865-6865/ad.andorratelecom.my_andorra_telecom

Only with Android 6 in Android 5 works fine

Shared elements between Activities

 Intent i = new Intent(MainActivity.this, SharedElementActivity.class);
        View sharedView = blueIconImageView;
        String transitionName = getString(R.string.blue_name);

        ActivityOptions transitionActivityOptions = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, sharedView, transitionName);
        startActivity(i, transitionActivityOptions.toBundle());

What is blueIconImageView. How can I create it?

java.lang.NoClassDefFoundError: android.transition.Explode exception when importing the project in eclipse

Hi i am getting following exception in logcat when i import and run this project

05-23 09:45:56.073: E/AndroidRuntime(480): FATAL EXCEPTION: main
05-23 09:45:56.073: E/AndroidRuntime(480): java.lang.NoClassDefFoundError: android.transition.Explode
05-23 09:45:56.073: E/AndroidRuntime(480): at com.lgvalle.material_animations.MainActivity.setupWindowAnimations(MainActivity.java:36)
05-23 09:45:56.073: E/AndroidRuntime(480): at com.lgvalle.material_animations.MainActivity.onCreate(MainActivity.java:31)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1712)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1764)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.ActivityThread.access$1500(ActivityThread.java:122)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1002)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.os.Handler.dispatchMessage(Handler.java:99)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.os.Looper.loop(Looper.java:132)
05-23 09:45:56.073: E/AndroidRuntime(480): at android.app.ActivityThread.main(ActivityThread.java:4025)
05-23 09:45:56.073: E/AndroidRuntime(480): at java.lang.reflect.Method.invokeNative(Native Method)
05-23 09:45:56.073: E/AndroidRuntime(480): at java.lang.reflect.Method.invoke(Method.java:491)
05-23 09:45:56.073: E/AndroidRuntime(480): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
05-23 09:45:56.073: E/AndroidRuntime(480): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
05-23 09:45:56.073: E/AndroidRuntime(480): at dalvik.system.NativeStart.main(Native Method)

Databinding

where is the databinding folder in this project?

Invalid slide direction

when I run the app, stopped and logcat errors:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lgvalle.material_animations/com.lgvalle.material_animations.MainActivity}: java.lang.IllegalArgumentException: Invalid slide direction

Transition animation in fragment

I want to have an activity. the activity has 3 tabs. each tab contain a fragment. the fragment contains list. when i click on a list item it will start an activity. how do i animate this and how to do the reverse animation. please do suggest. i dont find examples of transition animation for fragments.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.