Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Custom View to Activity communication

I have a custom control/view that observes the direction of a gesture within its bounds. I would like to send a different message back to the Activity hosting the View depending on the direction of the gesture. I'm having a hard time determine what the right way to do this is. I would think I could raise a custom event in the control and then stick a listener on the control in the activity, but I cannot find any information on custom events in Android. Any help would be appreciated.

Thanks.

like image 544
Blumer Avatar asked Apr 09 '10 06:04

Blumer


1 Answers

Boy, just a little bit more digging and I wouldn't have had to ask the question. For those who come this way wondering the same thing, though, I found this article did exactly what I was looking for: http://www.helloandroid.com/tutorials/custom-view-horizontalslider

like image 122
Blumer Avatar answered Sep 27 '22 20:09

Blumer