how to know main.xml (main view) has been clicked in android
<p>Could anyone guide how to detect whether main view (main.xml) has been clicked.
My main view is rendered this way.</p>

<pre><code>setContentView(R.layout.main2);

    &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" &gt;

  &lt;ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:src="@drawable/bottombar" /&gt;

&lt;ScrollView
    android:id="@+id/scrollView1"
    android:layout_above="@+id/imageView1"
    android:scrollbars="none"
    android:layout_width="fill_parent"
    android:fadingEdge="none"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true" &gt;

    &lt;LinearLayout
        android:id="@+id/linearLayout1"
        android:orientation="vertical"
        android:gravity="center"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" &gt;
    &lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</code></pre>

<p></p>

<p>Here is the clickhandler,</p>

<pre><code>RelativeLayout rlmain = (RelativeLayout)findViewById(R.id.RelativeLayout1);
rlmain.setOnClickListener(new OnClickListener() {
    public void onClick(View arg0) {
        Log.i("I m cliked", " ");

    }
});
</code></pre>

<p>Thanks.</p>
