All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.taig.android.mosby.delegate.DialogFragmentMvpDelegate Maven / Gradle / Ivy

/*
 * Copyright 2015 Hannes Dorfmann.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.taig.android.mosby.delegate;

import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.hannesdorfmann.mosby3.mvp.MvpPresenter;
import com.hannesdorfmann.mosby3.mvp.MvpView;

/**
 * A delegate for Fragments to attach them to mosby mvp.
 * 

* The following methods must be invoked from the corresponding Fragments lifecycle methods: * *

    *
  • {@link #onCreate(Bundle)}
  • *
  • {@link #onDestroy()}
  • *
  • {@link #onPause()}
  • *
  • {@link #onResume()}
  • *
  • {@link #onStart()}
  • *
  • {@link #onStop()}
  • *
  • {@link #onCreateDialog(Bundle)}
  • *
  • {@link #onActivityCreated(Bundle)}
  • *
  • {@link #onSaveInstanceState(Bundle)}
  • *
  • {@link #onAttach(Activity)}
  • *
  • {@link #onDetach()}
  • *
  • *
* * @param The type of {@link MvpView} * @param

The type of {@link MvpPresenter} * @author Hannes Dorfmann * @since 1.1.0 */ public interface DialogFragmentMvpDelegate> { /** * Must be called from {@link Fragment#onCreate(Bundle)} * * @param saved The bundle */ void onCreate( Bundle saved ); /** * Must be called from {@link Fragment#onDestroy()} */ void onDestroy(); void onCreateView(); void onCreateDialog( @Nullable Bundle savedInstanceState ); /** * Must be called from {@link Fragment#onDestroyView()} */ void onDestroyView(); /** * Must be called from {@link Fragment#onPause()} */ void onPause(); /** * Must be called from {@link Fragment#onResume()} */ void onResume(); /** * Must be called from {@link Fragment#onStart()} */ void onStart(); /** * Must be called from {@link Fragment#onStop()} */ void onStop(); /** * Must be called from {@link Fragment#onActivityCreated(Bundle)} * * @param savedInstanceState The saved bundle */ void onActivityCreated( Bundle savedInstanceState ); /** * Must be called from {@link Fragment#onAttach(Activity)} * * @param activity The activity the fragment is attached to */ void onAttach( Activity activity ); /** * Must be called from {@link Fragment#onDetach()} */ void onDetach(); /** * Must be called from {@link Fragment#onSaveInstanceState(Bundle)} * * @param outState The saved bundle */ void onSaveInstanceState( Bundle outState ); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy