Search in sources :

Example 36 with CallSuper

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);
    }
}
Also used : SuppressLint(android.annotation.SuppressLint) CallSuper(androidx.annotation.CallSuper)

Example 37 with CallSuper

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;
}
Also used : BasePreferenceController(com.android.settings.core.BasePreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) PreferenceControllerMixin(com.android.settings.core.PreferenceControllerMixin) ArrayList(java.util.ArrayList) CallSuper(androidx.annotation.CallSuper)

Example 38 with CallSuper

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());
}
Also used : LPaint(com.airbnb.lottie.animation.LPaint) Paint(android.graphics.Paint) CallSuper(androidx.annotation.CallSuper)

Example 39 with CallSuper

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);
}
Also used : Bundle(android.os.Bundle) CallSuper(androidx.annotation.CallSuper)

Example 40 with CallSuper

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);
        }
    }
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity) CallSuper(androidx.annotation.CallSuper)

Aggregations

CallSuper (androidx.annotation.CallSuper)45 BasePreferenceController (com.android.settings.core.BasePreferenceController)8 PreferenceControllerMixin (com.android.settings.core.PreferenceControllerMixin)8 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)8 ArrayList (java.util.ArrayList)8 Bundle (android.os.Bundle)6 Nullable (androidx.annotation.Nullable)6 View (android.view.View)4 TextView (android.widget.TextView)4 FragmentActivity (androidx.fragment.app.FragmentActivity)4 BaseRegistrationViewModel (org.thoughtcrime.securesms.registration.viewmodel.BaseRegistrationViewModel)4 SuppressLint (android.annotation.SuppressLint)3 TypedArray (android.content.res.TypedArray)3 SearchIndexableRaw (com.android.settingslib.search.SearchIndexableRaw)3 Intent (android.content.Intent)2 IntentFilter (android.content.IntentFilter)2 Resources (android.content.res.Resources)2 Paint (android.graphics.Paint)2 InputType (android.text.InputType)2 EditorInfo (android.view.inputmethod.EditorInfo)2