Dragger icon indicating copy to clipboard operation
Dragger copied to clipboard

problem on activity transition

Open Sinyuk7 opened this issue 8 years ago • 7 comments

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...

Sinyuk7 avatar Oct 09 '15 03:10 Sinyuk7

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

ppamorim avatar Dec 02 '15 23:12 ppamorim

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 !

Nomane avatar Dec 03 '15 12:12 Nomane

Can you create a sample of this problem to me?

ppamorim avatar Dec 03 '15 13:12 ppamorim

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!

766770719 avatar Dec 25 '15 03:12 766770719

@ppamorim I can give a simple of this. gif

Ivolian avatar Jan 13 '16 03:01 Ivolian

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

Nomane avatar Apr 17 '16 14:04 Nomane

@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

rkmax avatar Apr 29 '16 00:04 rkmax