-
public final class PhotoViewDialog.Builder<T extends Object>Builder class for PhotoViewDialog
-
-
Constructor Summary
Constructors Constructor Description PhotoViewDialog.Builder(Context context, Array<T> images, ImageLoader<T> imageLoader)PhotoViewDialog.Builder(Context context, List<T> images, ImageLoader<T> imageLoader)
-
Method Summary
Modifier and Type Method Description final PhotoViewDialog.Builder<T>withStartPosition(Integer position)Sets a position to start viewer from. final PhotoViewDialog.Builder<T>withBackgroundColor(@ColorInt() Integer color)Sets a background color value for the viewer final PhotoViewDialog.Builder<T>withBackgroundColorResource(@ColorRes() Integer color)Sets a background color resource for the viewer final PhotoViewDialog.Builder<T>withOverlayView(View view)Sets custom overlay view to be shown over the viewer. final PhotoViewDialog.Builder<T>withImagesMargin(@DimenRes() Integer dimen)Sets space between the images using dimension. final PhotoViewDialog.Builder<T>withImageMarginPixels(Integer marginPixels)Sets space between the images in pixels. final PhotoViewDialog.Builder<T>withContainerPadding(@DimenRes() Integer padding)Sets overall padding for zooming and scrolling area using dimension. final PhotoViewDialog.Builder<T>withContainerPadding(@DimenRes() Integer start, @DimenRes() Integer top, @DimenRes() Integer end, @DimenRes() Integer bottom)Sets start,top,endandbottompadding for zooming and scrolling area using dimension.final PhotoViewDialog.Builder<T>withContainerPaddingPixels(@Px() Integer padding)Sets overall padding for zooming and scrolling area in pixels. final PhotoViewDialog.Builder<T>withContainerPaddingPixels(Integer start, Integer top, Integer end, Integer bottom)Sets start,top,endandbottompadding for zooming and scrolling area in pixels.final PhotoViewDialog.Builder<T>withHiddenStatusBar(Boolean value)Sets status bar visibility. final PhotoViewDialog.Builder<T>allowZooming(Boolean value)Enables or disables zooming. final PhotoViewDialog.Builder<T>allowSwipeToDismiss(Boolean value)Enables or disables the "Swipe to Dismiss" gesture. final PhotoViewDialog.Builder<T>withTransitionFrom(ImageView imageView)Sets a target ImageView to be part of transition when opening or closing the viewer/ final PhotoViewDialog.Builder<T>withImageChangeListener(OnImageChangeListener imageChangeListener)Sets OnImageChangeListener for the viewer. final PhotoViewDialog.Builder<T>withDismissListener(OnDismissListener onDismissListener)Sets OnDismissListener for viewer. final PhotoViewDialog<T>build()Creates a PhotoViewDialog with the arguments supplied to this builder. final PhotoViewDialog<T>show(Boolean animate)Creates the PhotoViewDialog with the arguments supplied to this builder and shows the dialog. final PhotoViewDialog<T>show()Creates the PhotoViewDialog with the arguments supplied to this builder and shows the dialog. -
-
Constructor Detail
-
PhotoViewDialog.Builder
PhotoViewDialog.Builder(Context context, Array<T> images, ImageLoader<T> imageLoader)
-
PhotoViewDialog.Builder
PhotoViewDialog.Builder(Context context, List<T> images, ImageLoader<T> imageLoader)
-
-
Method Detail
-
withStartPosition
final PhotoViewDialog.Builder<T> withStartPosition(Integer position)
Sets a position to start viewer from.
-
withBackgroundColor
final PhotoViewDialog.Builder<T> withBackgroundColor(@ColorInt() Integer color)
Sets a background color value for the viewer
-
withBackgroundColorResource
final PhotoViewDialog.Builder<T> withBackgroundColorResource(@ColorRes() Integer color)
Sets a background color resource for the viewer
-
withOverlayView
final PhotoViewDialog.Builder<T> withOverlayView(View view)
Sets custom overlay view to be shown over the viewer. Commonly used for image description or counter displaying.
-
withImagesMargin
final PhotoViewDialog.Builder<T> withImagesMargin(@DimenRes() Integer dimen)
Sets space between the images using dimension.
-
withImageMarginPixels
final PhotoViewDialog.Builder<T> withImageMarginPixels(Integer marginPixels)
Sets space between the images in pixels.
-
withContainerPadding
final PhotoViewDialog.Builder<T> withContainerPadding(@DimenRes() Integer padding)
Sets overall padding for zooming and scrolling area using dimension.
-
withContainerPadding
final PhotoViewDialog.Builder<T> withContainerPadding(@DimenRes() Integer start, @DimenRes() Integer top, @DimenRes() Integer end, @DimenRes() Integer bottom)
Sets
start,top,endandbottompadding for zooming and scrolling area using dimension.
-
withContainerPaddingPixels
final PhotoViewDialog.Builder<T> withContainerPaddingPixels(@Px() Integer padding)
Sets overall padding for zooming and scrolling area in pixels.
-
withContainerPaddingPixels
final PhotoViewDialog.Builder<T> withContainerPaddingPixels(Integer start, Integer top, Integer end, Integer bottom)
Sets
start,top,endandbottompadding for zooming and scrolling area in pixels.
-
withHiddenStatusBar
final PhotoViewDialog.Builder<T> withHiddenStatusBar(Boolean value)
Sets status bar visibility. True by default.
-
allowZooming
final PhotoViewDialog.Builder<T> allowZooming(Boolean value)
Enables or disables zooming. True by default.
-
allowSwipeToDismiss
final PhotoViewDialog.Builder<T> allowSwipeToDismiss(Boolean value)
Enables or disables the "Swipe to Dismiss" gesture. True by default.
-
withTransitionFrom
final PhotoViewDialog.Builder<T> withTransitionFrom(ImageView imageView)
Sets a target ImageView to be part of transition when opening or closing the viewer/
-
withImageChangeListener
final PhotoViewDialog.Builder<T> withImageChangeListener(OnImageChangeListener imageChangeListener)
Sets OnImageChangeListener for the viewer.
-
withDismissListener
final PhotoViewDialog.Builder<T> withDismissListener(OnDismissListener onDismissListener)
Sets OnDismissListener for viewer.
-
build
final PhotoViewDialog<T> build()
Creates a PhotoViewDialog with the arguments supplied to this builder. It does not show the dialog. This allows the user to do any extra processing before displaying the dialog. Use .show if you don't have any other processing to do and want this to be created and displayed.
-
show
@JvmOverloads() final PhotoViewDialog<T> show(Boolean animate)
Creates the PhotoViewDialog with the arguments supplied to this builder and shows the dialog.
-
show
@JvmOverloads() final PhotoViewDialog<T> show()
Creates the PhotoViewDialog with the arguments supplied to this builder and shows the dialog.
-
-
-
-