Search in sources :

Example 1 with ServiceContainer

use of com.waz.zclient.ServiceContainer in project wire-android by wireapp.

the class BaseFragment method onAttach.

@Override
public final void onAttach(Activity activity) {
    super.onAttach(activity);
    if (activity instanceof ServiceContainer) {
        controllerFactory = ((ServiceContainer) activity).getControllerFactory();
    }
    Fragment fragment = getParentFragment();
    if (fragment != null) {
        container = (T) fragment;
    } else {
        container = (T) activity;
    }
    onPostAttach(activity);
}
Also used : ServiceContainer(com.waz.zclient.ServiceContainer) Fragment(androidx.fragment.app.Fragment)

Aggregations

Fragment (androidx.fragment.app.Fragment)1 ServiceContainer (com.waz.zclient.ServiceContainer)1