-
-
Notifications
You must be signed in to change notification settings - Fork 18
SimpleImageDialog
extends CustomViewDialog
A Dialog that displays an image
SimpleImageDialog.build()
.image(R.drawable.image_sample)
.show(Activity.this);-
Image
.image(int resourceId)
.image(Class<? extends Creator> builderClass)
.image(Uri imageUri) -
Scale / Scroll
scaleType(Scale scale)
Sets the scale type to one of: -
Scale.FIT: scales the image down ensuring the image is fully visible -
Scale.SCROLL_HORIZONTAL: scales the image up, allowing horizontal scrolling ("panorama") -
Scale.SCROLL_VERTICAL: scales the image up, allowing vertical scrolling
To avoid android.os.TransactionTooLargeException for large bitmaps passing a Bitmap directly is deprecated. Instead, pass a class that implements one of BitmapCreator, DrawableCreator or IconCreator.
Note that you have to use a special theme as parent when styling this dialog.
You can specify the theme using the imageDialogTheme attribute (rather than alertDialogTheme) or the theme(int resId) method.
Make sure that your theme's parent is the ImageDialogTheme, otherwise the dialog will not shrink to the image and there will be white stripes on either side of the image.
Javadoc API
Screenshot gallery
Styling dialogs with themes
Fullscreen dialogs
SimpleDialog
CustomViewDialog
CustomListDialog
SimpleCheckDialog
SimpleColorDialog
SimpleColorWheelDialog
SimpleDateDialog
SimpleEMailDialog
SimpleFormDialog
SimpleImageDialog
SimpleInputDialog
SimpleListDialog
SimplePinDialog
SimpleProgressDialog
SimpleTimeDialog