Weird onclick behavior of images on home screen widget
<p>I wrote a home screen widget with one image on it. When the image is clicked, browser will be opened for a url link.
Generally, it is working. But a weird thing is that, when I click background, then click the picture, the browser will not be open. Until I click the second time on the picture, the browser opens. The steps to reproduce is below:</p>

<ol>
<li>Click on the home screen widget background.</li>
<li>Click on the image on the home screen. The browser is not opened.</li>
<li>Click on the image again. The browser is opened.</li>
</ol>

<p>If I didn't click on the background, the image will react to click very well, i.e. browser will be open when the image is clicked the first time.</p>

<p>The widget XML file is as below:</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget"
android:layout_width="320dip" android:layout_height="200dip"
    android:background="@drawable/prt_base"
&gt;
    &lt;ImageView android:id="@+id/picture1"
        android:layout_width="134dip"
        android:layout_height="102dip"
        android:layout_marginLeft="62dip"
        android:layout_marginTop="6dip"
        android:scaleType="center"
                android:src="@drawable/picture1"
    /&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p>The code to set OnClick on the picture1 ImageView is as below:</p>

<pre><code>                        defineIntent = new Intent(Intent.ACTION_VIEW, Uri
                                .parse("http://www.google.com"));
                        pendingIntent = PendingIntent
                                .getActivity(context,
                                        0 /* no requestCode */,
                                        defineIntent, 0 /* no flags */);
                        updateViews.setOnClickPendingIntent(
                                picId, pendingIntent);
</code></pre>

<p>Anyone knows what's wrong?</p>

<p>Thanks.</p>
