Back to project page Android-CleanArchitecture.
The source code is released under:
Apache License
If you think the Android project Android-CleanArchitecture listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * Copyright (C) 2014 android10.org. All rights reserved. * @author Fernando Cejas (the android10 coder) *//*from w w w. j a v a 2s. c om*/ package com.fernandocejas.android10.sample.presentation.view.fragment; import android.app.Fragment; import android.os.Bundle; import android.widget.Toast; /** * Base {@link android.app.Fragment} class for every fragment in this application. */ public abstract class BaseFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); initializePresenter(); } /** * Initializes the {@link com.fernandocejas.android10.sample.presentation.presenter.Presenter} * for this fragment in a MVP pattern used to architect the application presentation layer. */ abstract void initializePresenter(); /** * Shows a {@link android.widget.Toast} message. * * @param message An string representing a message to be shown. */ protected void showToastMessage(String message) { Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show(); } }