OnClickListenerpublic abstract class ViewListener extends Object
AbilityForm supplier to listen
for click or touch events.
Currently, the system provides a child class OnClickListener for a callback upon click events. You can
inherit the ViewListener class to add other callback methods as required.
SystemCapability.Aafwk#ABILITY| 构造器 | 说明 |
|---|---|
ViewListener() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
abstract void |
onTouchEvent(AbilityForm form,
ViewsStatus viewsStatus) |
A callback method registered with the
AbilityForm supplier for you to implement callbacks upon touch
events. |
public abstract void onTouchEvent(AbilityForm form, ViewsStatus viewsStatus)
AbilityForm supplier for you to implement callbacks upon touch
events.
Generally, this method is triggered in the following scenario:
AbilityForm#registerViewListener(int, ViewListener) to
register a callback method upon touch events.ViewListener#onTouchEvent(AbilityForm, ViewsStatus).form - Indicates the AbilityForm object provided by the supplier.viewsStatus - Indicates the status of components for which a listener has been set on the client.