ozodrukh/CircularReveal

InvertedCircularReaveal

Closed this issue · 10 comments

This is a feature request. When next screen is reveal through circular reveal it would be very convinient and estethicaly pleasing to use inverted reveal when navigating back.

How invertedCircularReveal would work. Circle (with specified centerX, centerY) starts at MAX radius and shrinks to 0 dp or any other end-radius and dissapears, instead of revealing view inside the circle it reveals the view outside of circle's fill area (so the inside of the circle is the 'transaprent area' instead of outside as it is in the regular circle reveal).

may be i do not understand, aren't you talking about this ?

circular_examlple
I tried to attach an image what the idea I have in mind (PS master skills)

Top left shows how the animation looks shortly after reveal start. B is the view that was on showing and A is the view being revealed (C is mask scale pivot center).

So with typical reveal you have a opacity mask like on bottom left (white is visible, black is hidden part). While bottom right shows the mask for inverted reveal (again white is the part being revealed, black is hidden a.k.a view underneath)

If i understand right, you mean to reveal parent (but, keep child visible, hm it's impossible for now)

Try this one and reveal FrameLayout

<io.codetail.widget.RevealFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

   <FrameLayout <!-- This layout will made inverting -->
    android:id="@+id/inverted"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

          <android.support.v7.widget.CardView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/awesome_card"
        style="@style/CardView"
        app:cardBackgroundColor="@color/material_deep_teal_500"
        app:cardElevation="2dp"
        app:cardPreventCornerOverlap="false"
        app:cardUseCompatPadding="true"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:layout_gravity="center_horizontal"
        />

   </FrameLayout>

</io.codetail.widget.RevealFrameLayout>

Thanks. I can't run code atm, but will try it back home tonight.
Well if by "keep child visible" you're refering to the top right image, that is not necessarily the end of animation, B can be as small as 0dp.

The main difference between this and "reversed circular reveal" you referenced is that view A is being revieald from the sides to some (x, y) center instead of B being hidden. Here, A is on top of B and not the other way arround.

For example B view can be some previous activity while A is a new, transparent activity that is animated to "swallow" from the sides to some (x, y) the view behind it (view B).

I guess this means feature request was rejected?

oops, i thought problem was solved

animation

Excuse my photoshop skills, but I tried to make an animation how it would work.
Note that it is not the first screen disapearing, but rather the second screen (email/password) appearing in an inverted fashion.

Finally got it, will do my best to implement this feature

Hi, well i added reverse feature, check it out in last version, i hope i understood well and did it right, if no please re-open issue

is there any way to close reveal animation with Drag(using gestures) like snap chat and wats app status
3d63d530-2723-4556-9f98-e7f26f9b8672
c5bb6f9f-5ba3-42ab-acee-afafca533eeb