Search in sources :

Example 46 with FragmentTransaction

use of android.support.v4.app.FragmentTransaction in project android by owncloud.

the class FileActivity 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) {
        Log_OC.d(TAG, "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(android.support.v4.app.FragmentManager) FragmentTransaction(android.support.v4.app.FragmentTransaction) LoadingDialog(com.owncloud.android.ui.dialog.LoadingDialog) ConfirmationDialogFragment(com.owncloud.android.ui.dialog.ConfirmationDialogFragment) Fragment(android.support.v4.app.Fragment)

Example 47 with FragmentTransaction

use of android.support.v4.app.FragmentTransaction in project android by owncloud.

the class FolderPickerActivity method createFragments.

private void createFragments() {
    OCFileListFragment listOfFiles = OCFileListFragment.newInstance(true, true, false);
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
    transaction.commit();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) OCFileListFragment(com.owncloud.android.ui.fragment.OCFileListFragment)

Example 48 with FragmentTransaction

use of android.support.v4.app.FragmentTransaction in project android by owncloud.

the class LogHistoryActivity method showLoadingDialog.

/**
     * Show loading dialog
     */
public void showLoadingDialog() {
    // Construct dialog
    LoadingDialog loading = LoadingDialog.newInstance(R.string.log_progress_dialog_text, false);
    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 49 with FragmentTransaction

use of android.support.v4.app.FragmentTransaction in project android by owncloud.

the class FileActivity method showUntrustedCertDialog.

/**
     * Show untrusted cert dialog
     */
public void showUntrustedCertDialog(RemoteOperationResult result) {
    // Show a dialog with the certificate info
    FragmentManager fm = getSupportFragmentManager();
    SslUntrustedCertDialog dialog = (SslUntrustedCertDialog) fm.findFragmentByTag(DIALOG_UNTRUSTED_CERT);
    if (dialog == null) {
        dialog = SslUntrustedCertDialog.newInstanceForFullSslError((CertificateCombinedException) result.getException());
        FragmentTransaction ft = fm.beginTransaction();
        dialog.show(ft, DIALOG_UNTRUSTED_CERT);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) FragmentTransaction(android.support.v4.app.FragmentTransaction) SslUntrustedCertDialog(com.owncloud.android.ui.dialog.SslUntrustedCertDialog) CertificateCombinedException(com.owncloud.android.lib.common.network.CertificateCombinedException)

Example 50 with FragmentTransaction

use of android.support.v4.app.FragmentTransaction in project android by owncloud.

the class FileDisplayActivity method cleanSecondFragment.

protected void cleanSecondFragment() {
    Fragment second = getSecondFragment();
    if (second != null) {
        FragmentTransaction tr = getSupportFragmentManager().beginTransaction();
        tr.remove(second);
        tr.commit();
    }
    updateFragmentsVisibility(false);
    updateActionBarTitleAndHomeButton(null);
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) OCFileListFragment(com.owncloud.android.ui.fragment.OCFileListFragment) TaskRetainerFragment(com.owncloud.android.ui.fragment.TaskRetainerFragment) Fragment(android.support.v4.app.Fragment) PreviewAudioFragment(com.owncloud.android.ui.preview.PreviewAudioFragment) FileFragment(com.owncloud.android.ui.fragment.FileFragment) PreviewImageFragment(com.owncloud.android.ui.preview.PreviewImageFragment) PreviewVideoFragment(com.owncloud.android.ui.preview.PreviewVideoFragment) PreviewTextFragment(com.owncloud.android.ui.preview.PreviewTextFragment) FileDetailFragment(com.owncloud.android.ui.fragment.FileDetailFragment)

Aggregations

FragmentTransaction (android.support.v4.app.FragmentTransaction)392 Fragment (android.support.v4.app.Fragment)135 FragmentManager (android.support.v4.app.FragmentManager)79 View (android.view.View)29 DialogFragment (android.support.v4.app.DialogFragment)27 FragmentActivity (android.support.v4.app.FragmentActivity)25 Bundle (android.os.Bundle)21 TextView (android.widget.TextView)19 FragmentTransaction (android.app.FragmentTransaction)18 Intent (android.content.Intent)18 Button (android.widget.Button)17 OnClickListener (android.view.View.OnClickListener)16 SherlockFragment (com.actionbarsherlock.app.SherlockFragment)12 ActionBar (android.support.v7.app.ActionBar)8 TargetApi (android.annotation.TargetApi)6 AppCompatActivity (android.support.v7.app.AppCompatActivity)6 Toolbar (android.support.v7.widget.Toolbar)6 FriendsTimeLineFragment (org.qii.weiciyuan.ui.maintimeline.FriendsTimeLineFragment)6 UserInfoFragment (org.qii.weiciyuan.ui.userinfo.UserInfoFragment)6 Transition (android.transition.Transition)5