use of com.trovebox.android.common.util.ProgressDialogLoadingControl in project mobile-android by photo.
the class PhotoDetailsActivity method onNewIntent.
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (intent != null) {
if (intent.getData() != null) {
Uri uri = intent.getData();
TwitterUtils.verifyOAuthResponse(new ProgressDialogLoadingControl(this, true, false, getString(R.string.share_twitter_verifying_authentication)), this, uri, TwitterUtils.getPhotoDetailsCallbackUrl(this), null);
}
getContentFragment().reinitFromIntent(intent);
}
}
use of com.trovebox.android.common.util.ProgressDialogLoadingControl in project mobile-android by photo.
the class PhotoDetailsEditFragment method updatePhotoDetails.
private void updatePhotoDetails() {
final ProgressDialogLoadingControl loadingControl = new ProgressDialogLoadingControl(getActivity(), true, false, getString(R.string.updating_photo_message));
Runnable runOnSuccess = new Runnable() {
@Override
public void run() {
// need to self dismiss on successful editing
Dialog dialog = PhotoDetailsEditFragment.this.getDialog();
if (dialog != null && dialog.isShowing()) {
PhotoDetailsEditFragment.this.dismissAllowingStateLoss();
}
}
};
PhotoUtils.updatePhoto(photo, titleText.getText().toString(), descriptionText.getText().toString(), TagUtils.getTags(tagsText.getText().toString()), privateSwitch.isChecked(), runOnSuccess, loadingControl);
}
use of com.trovebox.android.common.util.ProgressDialogLoadingControl in project mobile-android by photo.
the class SyncUploadFragment method uploadSelectedFiles.
void uploadSelectedFiles(final boolean checkTwitter, final boolean checkFacebook) {
if (checkTwitter && twitterSwitch.isEnabled() && twitterSwitch.isChecked()) {
Runnable runnable = new Runnable() {
@Override
public void run() {
currentInstance.get().uploadSelectedFiles(false, checkFacebook);
}
};
TwitterUtils.runAfterTwitterAuthentication(new ProgressDialogLoadingControl(getActivity(), true, false, getString(R.string.share_twitter_requesting_authentication)), getSupportActivity(), runnable, runnable);
return;
}
if (checkFacebook && facebookSwitch.isEnabled() && facebookSwitch.isChecked()) {
Runnable runnable = new Runnable() {
@Override
public void run() {
currentInstance.get().uploadSelectedFiles(checkTwitter, false);
}
};
FacebookUtils.runAfterFacebookAuthentication(getSupportActivity(), MainActivity.AUTHORIZE_ACTIVITY_REQUEST_CODE, runnable, runnable);
return;
}
new UploadInitTask().execute();
}
use of com.trovebox.android.common.util.ProgressDialogLoadingControl in project mobile-android by photo.
the class UploadActivity method onNewIntent.
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (intent != null && intent.getData() != null) {
Uri uri = intent.getData();
TwitterUtils.verifyOAuthResponse(new ProgressDialogLoadingControl(this, true, false, getString(R.string.share_twitter_verifying_authentication)), this, uri, TwitterUtils.getUploadActivityCallbackUrl(this), null);
}
}
use of com.trovebox.android.common.util.ProgressDialogLoadingControl in project mobile-android by photo.
the class AlbumCreateFragment method createAlbum.
private void createAlbum() {
final ProgressDialogLoadingControl loadingControl = new ProgressDialogLoadingControl(getActivity(), true, false, getString(R.string.creating_album_message));
Runnable runOnSuccess = new Runnable() {
@Override
public void run() {
// need to self dismiss on successful editing
Dialog dialog = AlbumCreateFragment.this.getDialog();
if (dialog != null && dialog.isShowing()) {
AlbumCreateFragment.this.dismissAllowingStateLoss();
}
}
};
AlbumUtils.createAlbum(titleText.getText().toString(), runOnSuccess, loadingControl);
}
Aggregations