use of com.tmall.wireless.tangram3.support.SimpleClickSupport in project Tangram-Android by alibaba.
the class BaseCell method onClick.
@Override
public void onClick(View v) {
if (serviceManager != null) {
SimpleClickSupport service = serviceManager.getService(SimpleClickSupport.class);
if (service != null) {
int eventType = this.pos;
if (innerClickMap.containsKey(v.hashCode())) {
eventType = innerClickMap.get(v.hashCode()).intValue();
}
service.onClick(v, this, eventType);
}
}
}
use of com.tmall.wireless.tangram3.support.SimpleClickSupport in project Tangram-Android by alibaba.
the class BaseTangramEngine method destroy.
/**
* Call this when your activity is ready to destory to clear inner resource.
*/
public void destroy() {
if (mContentView != null) {
if (mGroupBasicAdapter != null) {
mGroupBasicAdapter.destroy();
}
mContentView.setAdapter(null);
mContentView = null;
}
TimerSupport timerSupport = getService(TimerSupport.class);
if (timerSupport != null) {
timerSupport.clear();
}
SimpleClickSupport simpleClickSupport = getService(SimpleClickSupport.class);
if (simpleClickSupport != null) {
simpleClickSupport.destroy();
}
ExposureSupport exposureSupport = getService(ExposureSupport.class);
if (exposureSupport != null) {
exposureSupport.destroy();
}
BusSupport busSupport = getService(BusSupport.class);
if (busSupport != null) {
busSupport.shutdown();
}
BannerSupport bannerSupport = getService(BannerSupport.class);
if (bannerSupport != null) {
bannerSupport.destroy();
}
MVHelper mvHelper = getService(MVHelper.class);
if (mvHelper != null) {
mvHelper.renderManager().destroyRenderService();
}
}
Aggregations