Search in sources :

Example 1 with EditShareFragment

use of com.owncloud.android.ui.fragment.EditShareFragment in project android by owncloud.

the class ShareActivity method showEditShare.

@Override
public void showEditShare(OCShare share) {
    // replace current fragment with EditShareFragment on demand
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    Fragment editShareFragment = EditShareFragment.newInstance(share, getFile(), getAccount());
    ft.replace(R.id.share_fragment_container, editShareFragment, TAG_EDIT_SHARE_FRAGMENT);
    // BACK button will recover the previous fragment
    ft.addToBackStack(null);
    ft.commit();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) ShareFileFragment(com.owncloud.android.ui.fragment.ShareFileFragment) DialogFragment(android.support.v4.app.DialogFragment) EditShareFragment(com.owncloud.android.ui.fragment.EditShareFragment) Fragment(android.support.v4.app.Fragment) SearchShareesFragment(com.owncloud.android.ui.fragment.SearchShareesFragment)

Example 2 with EditShareFragment

use of com.owncloud.android.ui.fragment.EditShareFragment in project android by owncloud.

the class ShareActivity method refreshSharesFromStorageManager.

/**
     * Updates the view, reading data from {@link com.owncloud.android.datamodel.FileDataStorageManager}
     */
private void refreshSharesFromStorageManager() {
    ShareFileFragment shareFileFragment = getShareFileFragment();
    if (shareFileFragment != null && shareFileFragment.isAdded()) {
        // only if added to the view hierarchy!!
        shareFileFragment.refreshCapabilitiesFromDB();
        shareFileFragment.refreshUsersOrGroupsListFromDB();
        shareFileFragment.refreshPublicShareFromDB();
    }
    SearchShareesFragment searchShareesFragment = getSearchFragment();
    if (searchShareesFragment != null && searchShareesFragment.isAdded()) {
        // only if added to the view hierarchy!!
        searchShareesFragment.refreshUsersOrGroupsListFromDB();
    }
    EditShareFragment editShareFragment = getEditShareFragment();
    if (editShareFragment != null && editShareFragment.isAdded()) {
        editShareFragment.refreshUiFromDB();
    }
}
Also used : SearchShareesFragment(com.owncloud.android.ui.fragment.SearchShareesFragment) EditShareFragment(com.owncloud.android.ui.fragment.EditShareFragment) ShareFileFragment(com.owncloud.android.ui.fragment.ShareFileFragment)

Aggregations

EditShareFragment (com.owncloud.android.ui.fragment.EditShareFragment)2 SearchShareesFragment (com.owncloud.android.ui.fragment.SearchShareesFragment)2 ShareFileFragment (com.owncloud.android.ui.fragment.ShareFileFragment)2 DialogFragment (android.support.v4.app.DialogFragment)1 Fragment (android.support.v4.app.Fragment)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1