@Override
	public void showShareDialog(final Activity context, final Entity entity, int options, final SocialNetworkShareListener socialNetworkListener, final ShareDialogListener dialogListener) {
		shareDialogFactory.show(context, entity, socialNetworkListener, new ShareDialogListener() {
			
			SharePanelView dialogView;
			
			@Override
			public void onCancel(Dialog dialog) {
				if(dialogListener != null) {
					dialogListener.onCancel(dialog);
				}
			}
			
			@Override
			public void onShow(Dialog dialog, SharePanelView dialogView) {
				if(dialogListener != null) {
					dialogListener.onShow(dialog, dialogView);
				}				
				this.dialogView = dialogView;
			}
			
			@Override
			public void onSimpleShare(ShareType type) {
				if(dialogListener != null) {
					dialogListener.onSimpleShare(type);
				}	
			}

			@Override
			public void onFlowInterrupted(DialogFlowController controller) {
				// Will not be called.
			}

			@Override
			public boolean onContinue(final Dialog dialog, boolean remember, final SocialNetwork... networks) {
				boolean consumed = false;
				
				if(dialogListener != null) {
					consumed = dialogListener.onContinue(dialog, remember, networks);
				}					
				
				if(!consumed) {
					doShare(dialog, context, entity, socialNetworkListener, networks);
				}
				else {
                    dialogListener.onFlowInterrupted(new DialogFlowController() {

                        @Override
                        public void onContinue(String text) {

                            ShareOptions options = new ShareOptions();
                            options.setText(text);

                            doShare(dialog, context, entity, socialNetworkListener, options, networks);
                        }

                        @Override
                        public void onCancel() {

                            if(dialogView != null) {
                                dialogView.getContinueButton().setEnabled(true);
                            }

                            dialogListener.onCancel(dialog);
                        }
                    });
				}
				
				return false;
			}
		}, options);		
	}
@Override
	public void showShareDialog(final Activity context, final Entity entity, int options, final SocialNetworkShareListener socialNetworkListener, final ShareDialogListener dialogListener) {
		shareDialogFactory.show(context, entity, socialNetworkListener, new ShareDialogListener() {
			
			SharePanelView dialogView;
			
			@Override
			public void onCancel(Dialog dialog) {
				if(dialogListener != null) {
					dialogListener.onCancel(dialog);
				}
			}
			
			@Override
			public void onShow(Dialog dialog, SharePanelView dialogView) {
				if(dialogListener != null) {
					dialogListener.onShow(dialog, dialogView);
				}				
				this.dialogView = dialogView;
			}
			
			@Override
			public void onSimpleShare(ShareType type) {
				if(dialogListener != null) {
					dialogListener.onSimpleShare(type);
				}	
			}

			@Override
			public void onFlowInterrupted(DialogFlowController controller) {
				
			}

			@Override
			public boolean onContinue(final Dialog dialog, boolean remember, final SocialNetwork... networks) {
				boolean consumed = false;
				
				if(dialogListener != null) {
					consumed = dialogListener.onContinue(dialog, remember, networks);
				}					
				
				if(!consumed) {
					doShare(dialog, context, entity, socialNetworkListener, networks);
				}
				else {
                    dialogListener.onFlowInterrupted(new DialogFlowController() {

                        @Override
                        public void onContinue(String text) {

                            ShareOptions options = new ShareOptions();
                            options.setText(text);

                            doShare(dialog, context, entity, socialNetworkListener, options, networks);
                        }

                        @Override
                        public void onCancel() {

                            if(dialogView != null) {
                                dialogView.getContinueButton().setEnabled(true);
                            }

                            dialogListener.onCancel(dialog);
                        }
                    });
				}
				
				return false;
			}
		}, options);		
	}
@ Override public void showShareDialog ( final Activity context , final Entity entity , int options , final SocialNetworkShareListener socialNetworkListener , final ShareDialogListener dialogListener ) { shareDialogFactory . show ( context , entity , socialNetworkListener , new ShareDialogListener ( ) { SharePanelView dialogView ; @ Override public void onCancel ( Dialog dialog ) { if ( dialogListener != null ) { dialogListener . onCancel ( dialog ) ; } } @ Override public void onShow ( Dialog dialog , SharePanelView dialogView ) { if ( dialogListener != null ) { dialogListener . onShow ( dialog , dialogView ) ; } this . dialogView = dialogView ; } @ Override public void onSimpleShare ( ShareType type ) { if ( dialogListener != null ) { dialogListener . onSimpleShare ( type ) ; } } @ Override public void onFlowInterrupted ( DialogFlowController controller ) { // Will not be called. } @ Override public boolean onContinue ( final Dialog dialog , boolean remember , final SocialNetwork ... networks ) { boolean consumed = false ; if ( dialogListener != null ) { consumed = dialogListener . onContinue ( dialog , remember , networks ) ; } if ( ! consumed ) { doShare ( dialog , context , entity , socialNetworkListener , networks ) ; } else { dialogListener . onFlowInterrupted ( new DialogFlowController ( ) { @ Override public void onContinue ( String text ) { ShareOptions options = new ShareOptions ( ) ; options . setText ( text ) ; doShare ( dialog , context , entity , socialNetworkListener , options , networks ) ; } @ Override public void onCancel ( ) { if ( dialogView != null ) { dialogView . getContinueButton ( ) . setEnabled ( true ) ; } dialogListener . onCancel ( dialog ) ; } } ) ; } return false ; } } , options ) ; }
/*
(non-Javadoc)
@see com.socialize.api.action.share.ShareUtilsProxy#showShareDialog(android.app.Activity, com.socialize.entity.Entity, int, com.socialize.api.action.share.SocialNetworkShareListener, com.socialize.ui.share.ShareDialogListener)
/ * ( non - Javadoc )