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 ...

Get Learning Material Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.