T
- type of event listener which will handle this eventpublic abstract class AndroidEventHandler<T> extends Object implements DMXEventRegistrationHandler<T>
Base class for implementing event handlers in Android. This class is parametrized, where type parameter is the type of the event listener to be implemented. Sample usage of this class is shown bellow:
public class SomeEventHandler <View.OnClickListener > implements View.OnClickListener {
........................
Modifier and Type | Field and Description |
---|---|
protected DMXAdapter |
adapter
Adapter instance.
|
Modifier | Constructor and Description |
---|---|
protected |
AndroidEventHandler(DMXAdapter adapter)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponentId(int id)
Add component ID to existing list.
|
void |
addComponentId(String id)
Add component ID to existing list.
|
String[] |
getComponentIds()
Returns IDs of UI components on which event listeners will be registered.
|
void |
setComponentIds(String... componentIds)
Set components IDs.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler
protected DMXAdapter adapter
protected AndroidEventHandler(DMXAdapter adapter)
adapter
- adapter instancepublic String[] getComponentIds()
DMXEventRegistrationHandler
getComponentIds
in interface DMXEventRegistrationHandler<T>
public void setComponentIds(String... componentIds)
componentIds
- component IDs as stringpublic void addComponentId(String id)
id
- component ID as stringpublic void addComponentId(int id)
id
- component ID as integerCopyright © 2012-2014 Vektor Software. All Rights Reserved.