0

I use A DrawerLayout in ActivityA.

I open the Drawer at first. When I click a item on Drawer, I skip to ActivityB.

In ActivityB ,I close the Drawer by EventBus. When I click the back button,ActivityB move out,and ActivityA move in.

But the screen flash once when Activity move in.

I know it's because that when I open a Drawer,ActivityA dark down.

When I turn back, Activity become normal because the Drawer is closed.

How can I deal with this problem?

User_1191
  • 981
  • 2
  • 8
  • 24
tiny sunlight
  • 6,231
  • 3
  • 21
  • 42

2 Answers2

0

You could remove the animation of the ActivityA by setting a theme with this item:

    <item name="android:windowAnimationStyle">@null</item>

Then implement your own animation. Something like a fast fade in would work.

Drilon Blakqori
  • 2,796
  • 2
  • 17
  • 25
0

Just remove these lines from DrawerLayout tag.

android:fitsSystemWindows="true"
tools:openDrawer="start"

The flash effect will be remove when you turn back. Hope it works on your side.

Tri Ngo Minh
  • 145
  • 1
  • 9