public FloatingHorizontalLayout(Context context) { this.context = context; if (!AppController.getController().eventBus().isRegistered(this)) { AppController.getController().eventBus().register(this); } adapter = new RecyclerFloatingAdapter(this, new ArrayList<AppsModel>()); gestureDetector = new GestureDetector(context, new GestureListener(this)); initWindows(); EventTrackerHelper.sendEvent("FloatingHorizontalLayout", "FloatingHorizontalLayout", "Init"); }
public void onDestroy() { if (windowManager != null && floatingImage != null) { windowManager.removeViewImmediate(floatingImage); windowManager.removeViewImmediate(view); } if (onMyAppsLoader != null) { onMyAppsLoader.unregisterListener(onLoadCompleteListener); onMyAppsLoader.cancelLoad(); onMyAppsLoader.stopLoading(); } if (AppController.getController().eventBus().isRegistered(this)) { AppController.getController().eventBus().unregister(this); } EventTrackerHelper.sendEvent("FloatingHorizontalLayout", "onDestroy", "onDestroy"); }