Package zendesk.belvedere
Class BelvedereUi.ImageStreamBuilder
- java.lang.Object
-
- zendesk.belvedere.BelvedereUi.ImageStreamBuilder
-
- Enclosing class:
- BelvedereUi
public static class BelvedereUi.ImageStreamBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidshowPopup(AppCompatActivity activity)Show the ImageStream to the user.BelvedereUi.ImageStreamBuilderwithCameraIntent()Allow the user to select an image from the camera.BelvedereUi.ImageStreamBuilderwithDocumentIntent(java.util.List<java.lang.String> contentTypes, boolean allowMultiple)Allow the user to select files of any specified content type from the system.BelvedereUi.ImageStreamBuilderwithDocumentIntent(java.lang.String contentType, boolean allowMultiple)Allow the user to select files of the specified content type from the system.BelvedereUi.ImageStreamBuilderwithExtraItems(java.util.List<MediaResult> mediaResults)Pass in files that are not selected but should show up in the ImageStream.BelvedereUi.ImageStreamBuilderwithFullScreenOnly(boolean enabled)Always show the image picker in full screen.BelvedereUi.ImageStreamBuilderwithMaxFileSize(long maxFileSize)Define a maximum file size.BelvedereUi.ImageStreamBuilderwithSelectedItems(java.util.List<MediaResult> mediaResults)Pass in files that are should be marked as selected.BelvedereUi.ImageStreamBuilderwithTouchableItems(int... ids)Specify a list of ids from your activity that should be clickable although the ImageStream is visible.
-
-
-
Method Detail
-
withCameraIntent
public BelvedereUi.ImageStreamBuilder withCameraIntent()
Allow the user to select an image from the camera.
-
withDocumentIntent
public BelvedereUi.ImageStreamBuilder withDocumentIntent(java.lang.String contentType, boolean allowMultiple)
Allow the user to select files of the specified content type from the system. Only one of the following should be called as they are mutually exclusive:BelvedereUi.ImageStreamBuilder.withDocumentIntent(String, boolean)BelvedereUi.ImageStreamBuilder.withDocumentIntent(List, boolean)- Parameters:
contentType- restrict the files to a content typeallowMultiple- allow the user to select multiple attachments in a third party app or the system file picker
-
withDocumentIntent
public BelvedereUi.ImageStreamBuilder withDocumentIntent(java.util.List<java.lang.String> contentTypes, boolean allowMultiple)
Allow the user to select files of any specified content type from the system. This can be used when allowing the selection of files from a disjoint set (e.g. "image/*" and "text/*"). Only one of the following should be called as they are mutually exclusive:BelvedereUi.ImageStreamBuilder.withDocumentIntent(String, boolean)BelvedereUi.ImageStreamBuilder.withDocumentIntent(List, boolean)- Parameters:
contentTypes- restrict the files to the content typesallowMultiple- allow the user to select multiple attachments in a third party app or the system file picker
-
withSelectedItems
public BelvedereUi.ImageStreamBuilder withSelectedItems(java.util.List<MediaResult> mediaResults)
Pass in files that are should be marked as selected.
-
withExtraItems
public BelvedereUi.ImageStreamBuilder withExtraItems(java.util.List<MediaResult> mediaResults)
Pass in files that are not selected but should show up in the ImageStream.
-
withTouchableItems
public BelvedereUi.ImageStreamBuilder withTouchableItems(int... ids)
Specify a list of ids from your activity that should be clickable although the ImageStream is visible.
-
withMaxFileSize
public BelvedereUi.ImageStreamBuilder withMaxFileSize(long maxFileSize)
Define a maximum file size. Files bigger than the provided value are not selectable.- Parameters:
maxFileSize- maximum file size in bytes
-
withFullScreenOnly
public BelvedereUi.ImageStreamBuilder withFullScreenOnly(boolean enabled)
Always show the image picker in full screen.- Parameters:
enabled-trueif the picker should be shown full screen to the user,falseif the picker should be drawn above the keyboard
-
showPopup
public void showPopup(AppCompatActivity activity)
Show the ImageStream to the user.
-
-