Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem on activity transition #31

Open
Sinyuk7 opened this issue Oct 9, 2015 · 7 comments
Open

problem on activity transition #31

Sinyuk7 opened this issue Oct 9, 2015 · 7 comments

Comments

@Sinyuk7
Copy link

Sinyuk7 commented Oct 9, 2015

My English is poor,so I try to explain it as clear as possible.
When I try to make activity transition like:
A -> B ( using dragger view as root view ) -> C ( using dragger view as root view ) .
A -> B is good, but B -> C , the background of B suddenly changes to A's , then transit to C. But after the animation , when I slide C , it shows activity B as a underlay correctly.
And I don't know how to fix this.PS,I just pasted some source code instead of importing dependency...

@ppamorim
Copy link
Owner

ppamorim commented Dec 2, 2015

You need to make the activity transparent to use this library. After all, set the background is needed to prevent this problem.

@ppamorim ppamorim closed this as completed Dec 2, 2015
@Nomane
Copy link

Nomane commented Dec 3, 2015

I have the same issue, I have an activity B and C with a DraggerView:

A ==> B :it's OK
B ==> C: it's OK but during transition I see my activity A !

@ppamorim
Copy link
Owner

ppamorim commented Dec 3, 2015

Can you create a sample of this problem to me?

@ppamorim ppamorim reopened this Dec 3, 2015
@766770719
Copy link

I have the same issue,the issue is when you open C will also callback B notifyOpen,so you can see A,and I solved it by extends:

import android.content.Context;
import android.util.AttributeSet;

import java.lang.reflect.Field;

public class DraggerView extends com.github.ppamorim.dragger.DraggerView {

public DraggerView(Context context) {
    super(context);
    clearSingleton();
}

public DraggerView(Context context, AttributeSet attrs) {
    super(context, attrs);
    clearSingleton();
}

public DraggerView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    clearSingleton();
}

private void clearSingleton() {
    try {
        Field field = com.github.ppamorim.dragger.DraggerView.class.getDeclaredField("singleton");
        field.setAccessible(true);
        field.set(this, null);
    } catch (NoSuchFieldException e) {
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        e.printStackTrace();
    }
}

}

Use this view in your layout!

@Ivolian
Copy link

Ivolian commented Jan 13, 2016

@ppamorim
I can give a simple of this.
gif

@Nomane
Copy link

Nomane commented Apr 17, 2016

Sorry, but it is not more simple to fix it on original DraggerView instead to have a custom view ...

@rkmax
Copy link

rkmax commented Apr 29, 2016

@ppamorim I have exactly the same problem

A: Normal
B: Dragger
C: Dragger

A -> normal -> B
B -> normal -> C
C -> I can see the A -> B
C -> I can see the lancher icons -> A

When the normal transitions are executed I can see a black backgrond there's some config in orde to get a solid background instead the transparent one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants