Android Fullscreen Fragment Dialog Background Clickable
<p>I have fullscreen fragment dialog. While it is showing, background objects can be clickable or interact with user. how do i avoid this?</p>

<p>Here is piece of code how i show dialog:</p>

<p>MainActivity.java</p>

<pre><code>FullScreenFrDialog fr = new FullScreenFrDialog();

FragmentTransaction tr = getSupportFragmentManager().beginTransaction();
tr.add(android.R.id.content, fr, FR_TAG).commit();
</code></pre>

<p>FullScreenFrDialog.java</p>

<pre><code>public class FullScreenFrDialog extends DialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,        Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.dialog, container, false);
    return view;
}
</code></pre>

<p>}</p>

<p>dialog.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CCFFFFFF" &gt;

&lt;ImageView
    android:layout_gravity="center"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_launcher" /&gt;

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

<p>main_activity.xml</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" &gt;

&lt;Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hello_world" /&gt;

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

<p>This button clickable, while dialog is showing.</p>

<p>Thanks in advance.</p>