Java Code Examples for android.support.v7.app.AppCompatActivity#isFinishing()
The following examples show how to use
android.support.v7.app.AppCompatActivity#isFinishing() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FragmentHelper.java From OmniList with GNU Affero General Public License v3.0 | 5 votes |
public static void replace(AppCompatActivity activity, Fragment fragment, @IdRes int containerId, String tag) { if (activity.isFinishing()) return; FragmentManager fragmentManager = activity.getSupportFragmentManager(); FragmentTransaction transaction = fragmentManager.beginTransaction(); setCustomAnimations(transaction); transaction.replace(containerId, fragment, tag).commit(); }
Example 2
Source File: FragmentHelper.java From OmniList with GNU Affero General Public License v3.0 | 5 votes |
private static void replace(AppCompatActivity activity, android.app.Fragment fragment, @IdRes int containerId, boolean backStack) { if (activity.isFinishing()) return; android.app.FragmentManager fragmentManager = activity.getFragmentManager(); android.app.FragmentTransaction transaction = fragmentManager.beginTransaction(); setCustomAnimations(transaction); if (backStack) transaction.addToBackStack(null); transaction.replace(containerId, fragment).commit(); }
Example 3
Source File: FragmentHelper.java From OmniList with GNU Affero General Public License v3.0 | 5 votes |
private static void replace(AppCompatActivity activity, Fragment fragment, @IdRes int containerId, boolean backStack) { if (activity.isFinishing()) return; FragmentManager fragmentManager = activity.getSupportFragmentManager(); FragmentTransaction transaction = fragmentManager.beginTransaction(); setCustomAnimations(transaction); if (backStack) transaction.addToBackStack(null); transaction.replace(containerId, fragment).commit(); }
Example 4
Source File: AppRateController.java From IslamicLibraryAndroid with GNU General Public License v3.0 | 5 votes |
public void showRateDialog(AppCompatActivity activity) { if (!activity.isFinishing()) { DialogFragment DonationReminderDialogFragment = new DonationReminderDialogFragment(); DonationReminderDialogFragment.show(activity.getSupportFragmentManager(), "DonationReminderDialogFragment"); PreferenceHelper.resetLaunchTimes(activity); PreferenceHelper.reSetLastRemind(activity); } }
Example 5
Source File: AppRateController.java From IslamicLibraryAndroid with GNU General Public License v3.0 | 5 votes |
public void showChangeLogDialog(AppCompatActivity activity) { if (!activity.isFinishing()) { DialogFragment donationReminderDialogFragment = new ChangeLogDialogFragment(); donationReminderDialogFragment.show(activity.getSupportFragmentManager(), "donationReminderDialogFragment"); PreferenceHelper.updateLastViewdChangeLog(activity); } }