Additional details which might be helpful:

My ImageView are in a table row.
Here's what my layout xml looks like:

<TableRow android:id="@+id/TableRow02" android:layout_weight="1">
            <ImageView android:id="@+id/image3"

             android:layout_weight="1"
             android:background="@android:color/transparent"
             android:padding="5dip"
             android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:clickable="true"
            />
            <ImageView android:id="@+id/image4"

            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:padding="5dip"
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:clickable="true"
            />
</tableRow>

My Code looks like this:

mImageButton1 = (ImageView)findViewById(R.id.image1);
mImageButton2 = (ImageView)findViewById(R.id.image2);


mImageButton2.setOnClickListener(new View.OnClickListener()
{
        public void onClick(View v)
        {
            handleButtonClick(2);
        }
});

mImageButton1.setOnClickListener(new View.OnClickListener()
{
        public void onClick(View v)
        {
            handleButtonClick(1);
        }
});

-----

Seems to me like the first time when I click one of the imageview, it
is working fine, but the second time I click, it thinks it's clicking
the table row instead of imageview..and hence not triggering the
onClickListener. When I click the 3rd time, it fires the listener.

Can someone please guide me in what's the best way to solve this issue
of clicking images in a table row?

Thanks,
Dipti


On Dec 7, 2:06 am, Dalvinder Singh <[email protected]> wrote:
> It would be better if you post some code snippet.
>
> Thx
> Dalvin
>
>
>
> On Tue, Dec 7, 2010 at 12:03 AM, dipti <[email protected]> wrote:
> > Hi,
>
> > I'm using an ImageView in my application. I've an AsynTask that is
> > executed onCreated() that downloads the image to be used in ImageView
> > from the web and stores it in a Hashmap as a softReference.
>
> > The first time when the activity is launched, the imageView works fine
> > on a single Click. The second time also it works fine on a single
> > click.
> > But from 3rd click onwards, it is only responding to a double click.
> > Can someone please help me understand what the issue must be?
> > In my onClickListner, I've a a method that calls updateImage, which
> > loads the image from the hashMap which was populated from the
> > AsynchTask.
>
> > Any insight in this is appreciated.
>
> > Thanks,
> > Dipti
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to