Support video attachments through GalleryMediaChooser

GalleryMediaChooser supports video types and more image types also. And
video thumbnails are overlaid with the play button image to distinguish
between images and videos.

Note:
 1. EXTRA_ALLOW_MULTIPLE is not specified for ACTION_GET_CONTENT.
 2. Files, methods and variables' name are still including "image".
 3. Content descriptions are not updated.

Test: Manual

Change-Id: I961928f150e4ae8ee80a1fba2f20c37fb5426669
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
Taesu Lee
2020-02-19 18:36:32 +09:00
parent a531636ae3
commit 6c77158718
20 changed files with 131 additions and 99 deletions
@@ -43,16 +43,16 @@ import java.util.Iterator;
import java.util.Map;
/**
* Shows a list of galley images from external storage in a GridView with multi-select
* capabilities, and with the option to intent out to a standalone image picker.
* Shows a list of galley mediae from external storage in a GridView with multi-select capabilities,
* and with the option to intent out to a standalone media picker.
*/
public class GalleryGridView extends MediaPickerGridView implements
GalleryGridItemView.HostInterface,
PersistentInstanceState,
DraftMessageDataListener {
/**
* Implemented by the owner of this GalleryGridView instance to communicate on image
* picking and multi-image selection events.
* Implemented by the owner of this GalleryGridView instance to communicate on media picking and
* multi-media selection events.
*/
public interface GalleryGridViewListener {
void onDocumentPickerItemClicked();
@@ -127,7 +127,7 @@ public class GalleryGridView extends MediaPickerGridView implements
final MessagePartData item = mSelectedImages.remove(data.getImageUri());
mListener.onItemUnselected(item);
if (mSelectedImages.size() == 0) {
// No image is selected any more, turn off multi-select mode.
// No media is selected any more, turn off multi-select mode.
setMultiSelectEnabled(false);
}
} else {