3

I have problem with circular reveal on my fragment. Whenever I call my reveal, it starts a new Activity and then inside onCreateView in fragment, it calls my reveal.

It works, but there is one glitch – as I start a new Activity, everything turns white. The Activity's background is white and covers data under it. Is it possible to show this data and not overlay it with this white background? Or should I make some kind of mask, animate it, and at the end start Activity?

xkcdBot
  • 21
  • 5
user3274539
  • 687
  • 2
  • 8
  • 18

1 Answers1

2

I had the same issue and resolved it by using a transparent activity. To make your Activity transparent, use this code.

Theme Definition in styles.xml

<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
    <item name="android:windowBackground">@android:color/transparent</item>
</style>

Activity Definition in AndroidManifest.xml

<activity
        android:name=".ui.CircularRevealActivity"
        android:theme="@style/Theme.Transparent"
        android:launchMode="singleTask"
        />

For a full answer on how to use a circular reveal animation on an activity, you can check this link.

Community
  • 1
  • 1
Stefan Medack
  • 2,731
  • 26
  • 32