Search in sources :

Example 11 with LoadingDialog

use of com.owncloud.android.ui.dialog.LoadingDialog in project android by nextcloud.

the class LogHistoryActivity method showLoadingDialog.

/**
 * Show loading dialog
 */
public void showLoadingDialog() {
    // Construct dialog
    LoadingDialog loading = LoadingDialog.newInstance(getResources().getString(R.string.log_progress_dialog_text));
    FragmentManager fm = getSupportFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    loading.show(ft, DIALOG_WAIT_TAG);
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) FragmentTransaction(android.support.v4.app.FragmentTransaction) LoadingDialog(com.owncloud.android.ui.dialog.LoadingDialog)

Example 12 with LoadingDialog

use of com.owncloud.android.ui.dialog.LoadingDialog in project android by owncloud.

the class BaseActivity method showLoadingDialog.

/**
 * Show loading dialog
 */
public void showLoadingDialog(int messageId) {
    // grant that only one waiting dialog is shown
    dismissLoadingDialog();
    // Construct dialog
    Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
    if (frag == null) {
        Timber.d("show loading dialog");
        LoadingDialog loading = LoadingDialog.newInstance(messageId, false);
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        loading.show(ft, DIALOG_WAIT_TAG);
        fm.executePendingTransactions();
    }
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) LoadingDialog(com.owncloud.android.ui.dialog.LoadingDialog) Fragment(androidx.fragment.app.Fragment)

Example 13 with LoadingDialog

use of com.owncloud.android.ui.dialog.LoadingDialog in project android by nextcloud.

the class FileActivity method showLoadingDialog.

/**
 * Show loading dialog
 */
public void showLoadingDialog(String message) {
    // grant that only one waiting dialog is shown
    dismissLoadingDialog();
    // Construct dialog
    Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
    if (frag == null) {
        Log_OC.d(TAG, "show loading dialog");
        LoadingDialog loading = LoadingDialog.newInstance(message);
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        loading.show(ft, DIALOG_WAIT_TAG);
        fm.executePendingTransactions();
    }
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) FragmentTransaction(androidx.fragment.app.FragmentTransaction) LoadingDialog(com.owncloud.android.ui.dialog.LoadingDialog) Fragment(androidx.fragment.app.Fragment) ConfirmationDialogFragment(com.owncloud.android.ui.dialog.ConfirmationDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment) FileDetailSharingFragment(com.owncloud.android.ui.fragment.FileDetailSharingFragment) FileDetailFragment(com.owncloud.android.ui.fragment.FileDetailFragment)

Aggregations

LoadingDialog (com.owncloud.android.ui.dialog.LoadingDialog)13 Fragment (android.support.v4.app.Fragment)4 Fragment (androidx.fragment.app.Fragment)4 ConfirmationDialogFragment (com.owncloud.android.ui.dialog.ConfirmationDialogFragment)4 FragmentManager (android.support.v4.app.FragmentManager)3 FragmentTransaction (android.support.v4.app.FragmentTransaction)3 DialogFragment (androidx.fragment.app.DialogFragment)2 FragmentManager (androidx.fragment.app.FragmentManager)2 FragmentTransaction (androidx.fragment.app.FragmentTransaction)2 OwnCloudCredentials (com.owncloud.android.lib.common.OwnCloudCredentials)2 FileDetailFragment (com.owncloud.android.ui.fragment.FileDetailFragment)2 FileDetailSharingFragment (com.owncloud.android.ui.fragment.FileDetailSharingFragment)2 Intent (android.content.Intent)1 Map (java.util.Map)1