Search in sources :

Example 1 with PhotosIntentWrapper

use of com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper in project photo-picker-plus-android by chute.

the class AssetActivity method onCreate.

@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    retrieveSavedValuesFromBundle(savedInstanceState);
    wrapper = new PhotosIntentWrapper(getIntent());
    account = wrapper.getAccount();
    filterType = wrapper.getFilterType();
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    if (savedInstanceState == null) {
        fragmentRoot = FragmentRoot.newInstance(account, filterType, selectedAccountsPositions, selectedImagesPositions, selectedVideosPositions);
        ft.add(R.id.gcFragments, fragmentRoot, FragmentUtil.TAG_FRAGMENT_FOLDER).commit();
    }
}
Also used : PhotosIntentWrapper(com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper) FragmentTransaction(android.support.v4.app.FragmentTransaction) SuppressLint(android.annotation.SuppressLint)

Example 2 with PhotosIntentWrapper

use of com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper in project photo-picker-plus-android by chute.

the class ServicesActivity method photoStream.

@Override
public void photoStream() {
    photoFilterType = PhotoFilterType.ALL_MEDIA.ordinal();
    accountItemPositions = null;
    imageItemPositions = null;
    videoItemPositions = null;
    if (!dualPanes) {
        final PhotosIntentWrapper wrapper = new PhotosIntentWrapper(ServicesActivity.this);
        wrapper.setFilterType(PhotoFilterType.ALL_MEDIA);
        wrapper.startActivityForResult(ServicesActivity.this, PhotosIntentWrapper.ACTIVITY_FOR_RESULT_STREAM_KEY);
    } else {
        FragmentUtil.replaceContentWithRootFragment(ServicesActivity.this, null, PhotoFilterType.ALL_MEDIA, accountItemPositions, imageItemPositions, videoItemPositions);
    }
}
Also used : PhotosIntentWrapper(com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper)

Example 3 with PhotosIntentWrapper

use of com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper in project photo-picker-plus-android by chute.

the class ServicesActivity method accountClicked.

public void accountClicked(AccountModel account, AccountType accountType) {
    PhotoPickerPreferenceUtil.get().setAccountType(accountType);
    photoFilterType = PhotoFilterType.SOCIAL_MEDIA.ordinal();
    accountItemPositions = null;
    imageItemPositions = null;
    videoItemPositions = null;
    this.account = account;
    if (!dualPanes) {
        final PhotosIntentWrapper wrapper = new PhotosIntentWrapper(ServicesActivity.this);
        wrapper.setFilterType(PhotoFilterType.SOCIAL_MEDIA);
        wrapper.setAccount(account);
        wrapper.startActivityForResult(ServicesActivity.this, PhotosIntentWrapper.ACTIVITY_FOR_RESULT_STREAM_KEY);
    } else {
        FragmentUtil.replaceContentWithRootFragment(ServicesActivity.this, account, PhotoFilterType.SOCIAL_MEDIA, accountItemPositions, imageItemPositions, videoItemPositions);
    }
}
Also used : PhotosIntentWrapper(com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper)

Example 4 with PhotosIntentWrapper

use of com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper in project photo-picker-plus-android by chute.

the class ServicesActivity method cameraRoll.

@Override
public void cameraRoll() {
    photoFilterType = PhotoFilterType.CAMERA_ROLL.ordinal();
    accountItemPositions = null;
    imageItemPositions = null;
    videoItemPositions = null;
    if (!dualPanes) {
        final PhotosIntentWrapper wrapper = new PhotosIntentWrapper(ServicesActivity.this);
        wrapper.setFilterType(PhotoFilterType.CAMERA_ROLL);
        wrapper.startActivityForResult(ServicesActivity.this, PhotosIntentWrapper.ACTIVITY_FOR_RESULT_STREAM_KEY);
    } else {
        FragmentUtil.replaceContentWithRootFragment(ServicesActivity.this, null, PhotoFilterType.CAMERA_ROLL, accountItemPositions, imageItemPositions, videoItemPositions);
    }
}
Also used : PhotosIntentWrapper(com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper)

Aggregations

PhotosIntentWrapper (com.getchute.android.photopickerplus.util.intent.PhotosIntentWrapper)4 SuppressLint (android.annotation.SuppressLint)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1