summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorGary Kipnis <gkipnis@cyngn.com>2016-05-20 15:25:59 -0700
committerMichael Bestas <mikeioannina@gmail.com>2016-12-30 21:04:51 +0200
commit645ed733485dade12b19c681249c9d2512fa399d (patch)
treecffb183a94fb8364de8cde7ca2a10026434f5cfc /res
parent6179387cf79592ecded99eb411605c602c3e20bb (diff)
downloadandroid_packages_apps_Messaging-645ed733485dade12b19c681249c9d2512fa399d.tar.gz
android_packages_apps_Messaging-645ed733485dade12b19c681249c9d2512fa399d.tar.bz2
android_packages_apps_Messaging-645ed733485dade12b19c681249c9d2512fa399d.zip
Added support for video and audio mms attachments
Change-Id: I690f941ac80a861e57494028f676a7db658bdce1 Ticket-Id: FEIJ-128, FEIJ-143
Diffstat (limited to 'res')
-rwxr-xr-xres/drawable/ic_library_music_black_24px.xml15
-rwxr-xr-xres/drawable/ic_library_music_white_24px.xml15
-rwxr-xr-xres/drawable/ic_play_circle_filled_white_24px.xml14
-rw-r--r--res/layout/audio_list_item_view.xml56
-rw-r--r--res/layout/gallery_grid_item_view.xml2
-rw-r--r--res/layout/mediapicker_audio_list_chooser.xml39
-rw-r--r--res/values/dimens.xml7
-rw-r--r--res/values/strings.xml14
8 files changed, 160 insertions, 2 deletions
diff --git a/res/drawable/ic_library_music_black_24px.xml b/res/drawable/ic_library_music_black_24px.xml
new file mode 100755
index 0000000..761d839
--- /dev/null
+++ b/res/drawable/ic_library_music_black_24px.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ <path
+ android:fillColor="#000000"
+ android:pathData="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1 .9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2
+5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57 0 1.08
+.19 1.5 .51 V5h4v2zM4 6H2v14c0 1.1 .9 2 2 2h14v-2H4V6z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_library_music_white_24px.xml b/res/drawable/ic_library_music_white_24px.xml
new file mode 100755
index 0000000..28ac927
--- /dev/null
+++ b/res/drawable/ic_library_music_white_24px.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1 .9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2
+5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57 0 1.08
+.19 1.5 .51 V5h4v2zM4 6H2v14c0 1.1 .9 2 2 2h14v-2H4V6z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_play_circle_filled_white_24px.xml b/res/drawable/ic_play_circle_filled_white_24px.xml
new file mode 100755
index 0000000..2f3b1b9
--- /dev/null
+++ b/res/drawable/ic_play_circle_filled_white_24px.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6
+4.5-6 4.5z" />
+</vector> \ No newline at end of file
diff --git a/res/layout/audio_list_item_view.xml b/res/layout/audio_list_item_view.xml
new file mode 100644
index 0000000..e22acc1
--- /dev/null
+++ b/res/layout/audio_list_item_view.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<com.android.messaging.ui.mediapicker.AudioListItemView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/audio_list_item_height"
+ android:background="@color/gallery_image_default_background"
+ android:clickable="true">
+
+ <FrameLayout
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="@dimen/audio_list_item_icon_margin"
+ android:layout_width="@dimen/audio_list_item_icon_size"
+ android:layout_height="@dimen/audio_list_item_icon_size">
+
+ <CheckBox
+ android:id="@+id/audio_checkbox"
+ style="@style/GalleryGridItemViewCheckBoxStyle"
+ android:button="@drawable/gallery_checkbox_selector"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+ <ImageView
+ android:id="@+id/audio_button"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/transparent_button_background"
+ android:scaleType="fitCenter"
+ android:src="@drawable/ic_library_music_black_24px"
+ android:contentDescription="@string/video_thumbnail_view_play_button_content_description"/>
+
+ </FrameLayout>
+
+ <TextView
+ android:id="@+id/audio_filename"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/audio_list_item_text_height"
+ android:layout_marginLeft="@dimen/audio_list_item_text_margin"
+ android:layout_gravity="center_vertical"
+ android:textColor="@color/button_text"/>
+
+</com.android.messaging.ui.mediapicker.AudioListItemView>
diff --git a/res/layout/gallery_grid_item_view.xml b/res/layout/gallery_grid_item_view.xml
index 88e4a1b..c5e32df 100644
--- a/res/layout/gallery_grid_item_view.xml
+++ b/res/layout/gallery_grid_item_view.xml
@@ -39,7 +39,7 @@
android:layout_gravity="center"
android:background="@drawable/transparent_button_background"
android:scaleType="fitCenter"
- android:src="@drawable/ic_video_play_light"
+ android:src="@drawable/ic_play_circle_filled_white_24px"
android:contentDescription="@string/video_thumbnail_view_play_button_content_description"/>
</FrameLayout>
diff --git a/res/layout/mediapicker_audio_list_chooser.xml b/res/layout/mediapicker_audio_list_chooser.xml
new file mode 100644
index 0000000..fbab0bc
--- /dev/null
+++ b/res/layout/mediapicker_audio_list_chooser.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.messaging.ui.mediapicker.AudioListView
+ android:id="@+id/audio_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="6dp"
+ android:background="@android:color/white" />
+
+ <!-- This view will hide all other views if the required permission is not granted -->
+ <TextView
+ android:id="@+id/missing_permission_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/enable_permission_procedure"
+ android:contentDescription="@string/enable_permission_procedure_description"
+ android:background="@android:color/white"
+ android:gravity="center"
+ android:visibility="gone" />
+</FrameLayout> \ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5ff0eb7..6f82d72 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -92,6 +92,13 @@
<dimen name="multiple_attachment_preview_padding">1dp</dimen>
<dimen name="attachment_preview_more_items_text_size">22sp</dimen>
+ <dimen name="audio_list_item_height">48dp</dimen>
+ <dimen name="audio_list_item_icon_size">20dp</dimen>
+ <dimen name="audio_list_item_icon_margin">26dp</dimen>
+ <dimen name="audio_list_item_text_margin">26dp</dimen>
+ <dimen name="audio_list_item_text_height">24dp</dimen>
+
+
<item name="letter_to_tile_ratio" type="dimen">67%</item>
<item name="sim_identifier_to_tile_ratio" type="dimen">28%</item>
<item name="small_sim_identifier_to_tile_ratio" type="dimen">75%</item>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 012d87f..30a8bd9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -51,7 +51,9 @@
<string name="contact_list_send_to_text">Send to <xliff:g id="destination">%s</xliff:g></string>
<string name="mediapicker_cameraChooserDescription">Capture pictures or video</string>
- <string name="mediapicker_galleryChooserDescription">Choose images from this device</string>
+ <string name="mediapicker_galleryChooserDescription">Choose images or videos from this
+ device</string>
+ <string name="mediapicker_audioListChooserDescription">Choose audios from this device</string>
<string name="mediapicker_audioChooserDescription">Record audio</string>
<string name="mediapicker_gallery_title">Choose photo</string>
<string name="mediapicker_gallery_item_selected_content_description">The media is selected.</string>
@@ -60,6 +62,16 @@
<!-- example: "image January 17 2015 1 59 pm" -->
<string name="mediapicker_gallery_image_item_description">image <xliff:g id="date">%1$tB %1$te %1$tY %1$tl %1$tM %1$tp</xliff:g></string>
<string name="mediapicker_gallery_image_item_description_no_date">image</string>
+ <string name="mediapicker_gallery_image_item_attachment_too_large">Can\'t attach video.
+ Max message size exceeded.</string>
+ <string name="mediapicker_audio_list_title">Choose audio</string>
+ <string name="mediapicker_audio_list_item_selected_content_description">The audio is selected
+ .</string>
+ <string name="mediapicker_audio_list_item_unselected_content_description">The audio is
+ unselected
+ .</string>
+ <string name="mediapicker_audio_list_title_selection"><xliff:g id="count">%d</xliff:g> selected
+ </string>
<string name="mediapicker_audio_title">Record audio</string>
<string name="action_share">Share</string>