TouchListener would work in this case. You can act upon specific
events such as MOUSE_DOWN, MOUSE_UP etc.

Thanks and Regards,
Kumar Bibek

On Mar 30, 1:54 am, "Kevin S." <[email protected]> wrote:
> Have you tried view.setOnTouchListener()?  I think you then get a
> motionEvent which you can look at to determine if the event was a
> touch up or a touch down.  I've not tried it in a listview before,
> however.
>
> -Kevin
>
> On Mar 27, 1:54 pm, lukas <[email protected]> wrote:
>
> > Hello everyone,
>
> > I'm programming my first Android application and I've stumbled over a
> > little problem.
>
> > I've created my own adapter ("extends BaseAdapter") for my ListView
> > and in my "public View getView(...)" I have the following code:
>
> >  view.setOnClickListener(new View.OnClickListener() {
>
> >                                         @Override
> >                                         public void onClick(View v) {
> >                                                 
> > v.setBackgroundColor(Color.RED);
> >                                                 testClick(clickPos); //my 
> > test method that shows a Toast-
> > message..
> >                                         }
>
> > My problem: How do I set the color back to "Color.BLACK" after the
> > user releases the touchscreen?
>
> > I'm looking for something that is similar to Javascripts "onMouseUp"
> > or "onKeyUp" methods. An OnClickReleaseListener() perhaps?
>
> > Can you point me in the right direction?
>
> > Thank you.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to