How to show image view before activity will open on button click : <p>i am new to android. 
i want to show full screen image on Activity like a layer,
When i click on button i want to call new activity but before activity i want to show an image(full screen)on that activity for 5 seconds.like ads. how can i do ? please help me. thank you in advance.</p>

<p>here is my xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/black_ng2"&gt;

&lt;ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/imageViewForAd"
    android:adjustViewBounds="true"
    android:src="@drawable/splash_screen"/&gt;


&lt;RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="@dimen/_15sdp"
    android:layout_marginRight="@dimen/_15sdp"
    android:layout_marginTop="@dimen/_15sdp"
    android:layout_marginBottom="@dimen/_15sdp"
    android:padding="@dimen/_10sdp"
    android:id="@+id/cardLayout"
    android:layout_centerVertical="true"
    android:layout_alignParentEnd="true"
    android:layout_marginEnd="10dp"
    android:layout_alignParentRight="true"&gt;

    &lt;android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/_15sdp"
        android:layout_marginBottom="@dimen/_15sdp"
        android:id="@+id/textInputLayoutPooja"
        android:textColorHint="@color/colorwhite"&gt;
        &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="phone"
            android:hint="Date Of Mandal Pooja"
            android:id="@+id/txtDateOfPooja"
            android:drawableLeft="@drawable/calender"
            android:textSize="@dimen/_15sdp"
            android:textColor="@color/colorwhite"/&gt;

    &lt;/android.support.design.widget.TextInputLayout&gt;
    &lt;android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/_15sdp"
        android:layout_marginBottom="@dimen/_15sdp"
        android:id="@+id/textInputLayoutYaatra"
        android:layout_below="@+id/textInputLayoutPooja"
        android:textColorHint="@color/colorwhite"&gt;
        &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Date Of Yaatra"
            android:id="@+id/txtDateOfYaatra"
            android:textSize="@dimen/_15sdp"
            android:drawableLeft="@drawable/calender"
            android:textColor="@color/colorwhite"/&gt;

    &lt;/android.support.design.widget.TextInputLayout&gt;
    &lt;android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/_15sdp"
        android:layout_marginBottom="@dimen/_15sdp"
        android:id="@+id/textInputLayoutDarshan"
        android:layout_below="@+id/textInputLayoutYaatra"
        android:textColorHint="@color/colorwhite"&gt;
        &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Date Of Darshan"
            android:id="@+id/txtDateOfDarshan"
            android:textSize="@dimen/_15sdp"
            android:drawableLeft="@drawable/calender"
            android:textColor="@color/colorwhite"/&gt;

    &lt;/android.support.design.widget.TextInputLayout&gt;

    &lt;Button
        android:layout_width="@dimen/_80sdp"
        android:layout_height="@dimen/_40sdp"
        android:text="Add Yaatra"
        android:id="@+id/btnAddYaatra"
        android:textSize="@dimen/_15sdp"
        android:layout_below="@+id/textInputLayoutDarshan"
        android:background="@color/btncolor"
        android:textColor="@color/colorwhite"
        android:layout_centerHorizontal="true" /&gt;



&lt;/RelativeLayout&gt;
</code></pre>

<p></p>
