Revealing and hiding
Placing views and view groups in a layout and setting them as invisible, to be revealed later, is a lightweight and useful technique for changing the appearance of a screen without having to load separate activities or fragments. Furthermore, the circular reveal is designed specifically with material in mind.
Any view can be hidden and revealed, but for the sake of this exercise, we will use the following ImageView
XML definition:
<ImageView android:id="@+id/image_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:src="@drawable/some_image" android:visibility="invisible" />
Reveal animations can be triggered by almost any event, but here we will simply use a button press. In your Java activity file, declare the button and image views as fields:
private ImageView imageView; private Buttton...