diff options
author | Mark Wei <markwei@google.com> | 2013-03-21 06:04:46 -0700 |
---|---|---|
committer | Mark Wei <markwei@google.com> | 2013-07-08 20:26:23 -0700 |
commit | 479505d71969e26b0785d8e0e1b81108731cf827 (patch) | |
tree | 069a592e9b3b2c8d43836e2b8ccaf47bced2fc13 /res/values | |
parent | bb8dca879c88ad5f6de3a5ffc80b0a8e2d9e5f72 (diff) | |
download | android_packages_apps_UnifiedEmail-479505d71969e26b0785d8e0e1b81108731cf827.tar.gz android_packages_apps_UnifiedEmail-479505d71969e26b0785d8e0e1b81108731cf827.tar.bz2 android_packages_apps_UnifiedEmail-479505d71969e26b0785d8e0e1b81108731cf827.zip |
Attachments in Conversation List: Backend changes so that the appropriate
attachments are passed to the UI. Implement PhotoManager so we can start showing
images.
Upon sync, we extract two image attachments from the first unread message, and
add them to the conversations table.
UI changes as well.
Load BEST if that is available, else load SIMPLE.
No vertical dividers in attachment previews.
Attachment previews are above labels.
Round badge appears for unread conversations when there are more images than
shown. Only appears after the previews have loaded.
Clicking on the attachment previews launches photoviewer.
Attempt to load bigger images than necessary to prevent reloading during mark
read/unread and rotate.
Show animated loading icon while previews are loading.
Previews load from top to bottom, from left to right.
Big performance improvements:
No longer decoding bitmap on UI thread. This kills most of the jank.
Only load when we are not scrolling. This kills a lot of jank.
Remaining jank will be delt with later:
DividedImageCanvas.setDimensions() creates a huge empty bitmap on the UI
thread, which causes a GC. ath will fix.
Multiple images in one line now load whatever's ready first. Added tracing.
Bitmap cache given more memory.
Following ath's advice, decode Bitmap from InputStream rather than byte[]. Don't
compress into BitmapHolder. Only use the bigger Bitmap cache.
Bug: 7481049
Change-Id: Icf823f56abc9345e6d0b800a1e6d45444d8fa028
Diffstat (limited to 'res/values')
-rw-r--r-- | res/values/colors.xml | 3 | ||||
-rw-r--r-- | res/values/constants.xml | 3 | ||||
-rw-r--r-- | res/values/dimen.xml | 17 | ||||
-rw-r--r-- | res/values/strings.xml | 2 |
4 files changed, 23 insertions, 2 deletions
diff --git a/res/values/colors.xml b/res/values/colors.xml index c3972fd92..4a7261004 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -32,6 +32,9 @@ <color name="date_text_color">@color/dark_gray_text_color</color> <color name="message_info_text_color">@color/gray_text_color</color> <color name="subject_text_color">#333333</color> + <!--todo:markwei get overflow badge and count color from channah--> + <color name="ap_overflow_badge_color">#aaeeeeee</color> + <color name="ap_overflow_text_color">@android:color/tertiary_text_light</color> <!-- a 'checked' item is in the conversation selection set. also the 'pressed' color. --> <!-- this is holo_blue_light @ 20% opacity --> <color name="checked_item_background_color">#cfe9f3</color> diff --git a/res/values/constants.xml b/res/values/constants.xml index f05a3405f..517ae8dd3 100644 --- a/res/values/constants.xml +++ b/res/values/constants.xml @@ -114,4 +114,7 @@ <!-- Number of menu items to hide from the ActionBar by subtracting from actionbar_max_items in non-cab mode --> <integer name="actionbar_hidden_non_cab_items_no_physical_button">1</integer> + + <!-- Max overflow count to show for attachment previews --> + <integer name="ap_overflow_max_count">99</integer> </resources> diff --git a/res/values/dimen.xml b/res/values/dimen.xml index 32230ff69..1937ae5f5 100644 --- a/res/values/dimen.xml +++ b/res/values/dimen.xml @@ -109,11 +109,24 @@ <dimen name="tile_letter_font_size_small">16dp</dimen> <dimen name="tile_divider_width">1dp</dimen> <dimen name="sync_status_bar_height">40dip</dimen> + <dimen name="attachment_preview_height_tall">124dip</dimen> <dimen name="attachment_preview_height_tall_wide">168dip</dimen> <dimen name="attachment_preview_height_short">28dip</dimen> - <dimen name="attachment_preview_margin_top">8dip</dimen> - <dimen name="attachment_preview_margin_top_wide">12dip</dimen> + <!-- Margin of 8dp with 12dp cancelled out --> + <dimen name="attachment_preview_margin_top">-4dip</dimen> + <!-- Margin of 8dp with 16dp cancelled out --> + <dimen name="attachment_preview_margin_top_spacious">-8dip</dimen> + <!-- Margin of 12dp with 10dp cancelled out --> + <dimen name="attachment_preview_margin_top_wide">2dip</dimen> <dimen name="attachment_preview_margin_side">16dip</dimen> + <dimen name="attachment_preview_margin_bottom">4dp</dimen> + <dimen name="attachment_preview_margin_bottom_wide">8dp</dimen> + + <!--todo:markwei get the diameter from channah--> + <dimen name="ap_overflow_count_diameter">20dp</dimen> + <!--todo:markwei channah wanted 8dp but only 4dp fits read previews--> + <dimen name="ap_margin_side">4dp</dimen> + <dimen name="folder_minimum_width">48dip</dimen> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 642358c0b..a674dd202 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -346,6 +346,8 @@ <!-- Displayed in Conversation Header View and Widget in the form of "subject - snippet" [CHAR LIMIT=5] --> <string name="subject_and_snippet"><xliff:g>%s</xliff:g> \u2014 <xliff:g>%s</xliff:g></string> + <!-- Displayed in attachment previews in conversation list [CHAR LIMIT=1] --> + <string name="ap_overflow_format">+<xliff:g>%d</xliff:g></string> <!-- Displayed in browse list item when the list item is a draft message instead of showing the subject [CHAR LIMIT=100] --> <plurals name="draft"> <!-- Title of the screen when there is exactly one draft --> |