use of androidx.annotation.CallSuper in project FlexibleAdapter by davideas.
the class FlexibleAdapter method onViewAttachedToWindow.
@CallSuper
@Override
public void onViewAttachedToWindow(@NonNull RecyclerView.ViewHolder holder) {
int position = holder.getAdapterPosition();
// log.v("onViewAttached Holder=%s position=%s", getClassName(holder), position);
T item = getItem(position);
if (item != null) {
item.onViewAttached(this, holder, position);
}
}
use of androidx.annotation.CallSuper in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BaseSearchIndexProvider method getNonIndexableKeys.
@Override
@CallSuper
public List<String> getNonIndexableKeys(Context context) {
if (!isPageSearchEnabled(context)) {
// Entire page should be suppressed, mark all keys from this page as non-indexable.
return getNonIndexableKeysFromXml(context, true);
}
final List<String> nonIndexableKeys = new ArrayList<>();
nonIndexableKeys.addAll(getNonIndexableKeysFromXml(context, false));
final List<AbstractPreferenceController> controllers = getPreferenceControllers(context);
if (controllers != null && !controllers.isEmpty()) {
for (AbstractPreferenceController controller : controllers) {
if (controller instanceof PreferenceControllerMixin) {
((PreferenceControllerMixin) controller).updateNonIndexableKeys(nonIndexableKeys);
} else if (controller instanceof BasePreferenceController) {
((BasePreferenceController) controller).updateNonIndexableKeys(nonIndexableKeys);
} else {
Log.e(TAG, controller.getClass().getName() + " must implement " + PreferenceControllerMixin.class.getName() + " treating the key non-indexable");
nonIndexableKeys.add(controller.getPreferenceKey());
}
}
}
return nonIndexableKeys;
}
use of androidx.annotation.CallSuper in project lottie-android by airbnb.
the class BaseLayer method getBounds.
@CallSuper
@Override
public void getBounds(RectF outBounds, Matrix parentMatrix, boolean applyParents) {
rect.set(0, 0, 0, 0);
buildParentLayerListIfNeeded();
boundsMatrix.set(parentMatrix);
if (applyParents) {
if (parentLayers != null) {
for (int i = parentLayers.size() - 1; i >= 0; i--) {
boundsMatrix.preConcat(parentLayers.get(i).transform.getMatrix());
}
} else if (parentLayer != null) {
boundsMatrix.preConcat(parentLayer.transform.getMatrix());
}
}
boundsMatrix.preConcat(transform.getMatrix());
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseActivity method onSaveInstanceState.
@CallSuper
@Override
protected void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
Timber.d("onSaveInstanceState %s", this.toString());
final Bundle viewModelEnvelope = new Bundle();
if (this.viewModel != null) {
ActivityViewModelManager.getInstance().save(this.viewModel, viewModelEnvelope);
}
outState.putBundle(VIEW_MODEL_KEY, viewModelEnvelope);
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseFragment method onPause.
@CallSuper
@Override
public void onPause() {
this.lifecycle.onNext(FragmentEvent.PAUSE);
super.onPause();
Timber.d("onPause %s", this.toString());
if (this.viewModel != null) {
this.viewModel.onPause();
final FragmentActivity activity = getActivity();
if (activity != null) {
activity.unregisterReceiver(this.optimizelyReadyReceiver);
}
}
}
Aggregations