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>
diff --git a/res/layout/gallery_grid_item_view.xml b/res/layout/gallery_grid_item_view.xml
index 8b7ee58..f474a6b 100644
--- a/res/layout/gallery_grid_item_view.xml
+++ b/res/layout/gallery_grid_item_view.xml
@@ -43,4 +43,14 @@
android:paddingTop="4dp"
android:visibility="gone"
android:contentDescription="@string/gallery_checkbox_content_description" />
+
+ <!-- Play button image for video contents only -->
+ <ImageView
+ android:id="@+id/video_thumbnail_play_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:background="@color/background_item_transparent"
+ android:src="@drawable/ic_video_play_light"
+ android:visibility="gone" />
</com.android.messaging.ui.mediapicker.GalleryGridItemView>
diff --git a/res/layout/mediapicker_image_chooser.xml b/res/layout/mediapicker_gallery_chooser.xml
similarity index 100%
rename from res/layout/mediapicker_image_chooser.xml
rename to res/layout/mediapicker_gallery_chooser.xml
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0e91156..521b1fa 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -53,7 +53,7 @@
<string name="mediapicker_cameraChooserDescription">Capture pictures or video</string>
<string name="mediapicker_galleryChooserDescription">Choose images from this device</string>
<string name="mediapicker_audioChooserDescription">Record audio</string>
- <string name="mediapicker_gallery_title">Choose photo</string>
+ <string name="mediapicker_gallery_title">Choose media</string>
<string name="mediapicker_gallery_item_selected_content_description">The media is selected.</string>
<string name="mediapicker_gallery_item_unselected_content_description">The media is unselected.</string>
<string name="mediapicker_gallery_title_selection"><xliff:g id="count">%d</xliff:g> selected</string>