problem on activity transition
Sinyuk7 opened this issue · 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...
You need to make the activity transparent to use this library. After all, set the background is needed to prevent this problem.
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 !
Can you create a sample of this problem to me?
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!
Sorry, but it is not more simple to fix it on original DraggerView instead to have a custom view ...
@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