Example of custom event dispatching in Android?
I have a scenario below, and was wondering if anyone had a good solution. Basically, I have a class which manages a cust开发者_JS百科om ViewFlipper object. One of these views within the ViewFlipper instance consists of a custom ScrollView with custom rows (which reside in mRows an ArrayList of the rows). In the custom ScrollView class I have the loop...
for (CustomRow : mRows)
{
row.setOnTouchListener(this);
}
In the onTouch listener I want to be able to notify the top level view (the object that holds the reference to the ViewFlipper instance). What is the most efficient way to do this?
精彩评论