diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-02-01 12:57:14 -0800 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2013-02-12 17:35:44 -0800 |
commit | 8f93c89aaa7e99a9e924e054650ca2c3570bf490 (patch) | |
tree | d987e41088da6ae8a52f6c867c0d0b329d8d2294 | |
parent | 6ddf7e02012afe4b04b527f70daea37cf105305b (diff) | |
download | android_packages_apps_Snap-8f93c89aaa7e99a9e924e054650ca2c3570bf490.tar.gz android_packages_apps_Snap-8f93c89aaa7e99a9e924e054650ca2c3570bf490.tar.bz2 android_packages_apps_Snap-8f93c89aaa7e99a9e924e054650ca2c3570bf490.zip |
Importer: Full-screen viewing, UI refinement, refactoring
Bug: 7990333
Bug: 8151814
Bug: 8037411
This CL adds or changes the following things:
- Full-screen image viewing and UI for switching modes
- Moved general functionality from MtpThumbnailTileView
to MtpImageView to allow for reuse in full-screen image
use-case
- MtpBitmapCache moved from ui to data package
- Orientation now respected when set in image metadata
- Miscellaneous UI consistency issues fixed
- Miscellaneous instability issues fixed
Change-Id: I5f188b763617b693e32fedc03273d711d604922a
-rw-r--r-- | res/layout/ingest_activity_item_list.xml | 19 | ||||
-rw-r--r-- | res/layout/ingest_fullsize.xml | 36 | ||||
-rw-r--r-- | res/menu/ingest_menu_item_list_selection.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 3 |
4 files changed, 54 insertions, 6 deletions
diff --git a/res/layout/ingest_activity_item_list.xml b/res/layout/ingest_activity_item_list.xml index 23a95f658..f0e91e8e2 100644 --- a/res/layout/ingest_activity_item_list.xml +++ b/res/layout/ingest_activity_item_list.xml @@ -14,35 +14,42 @@ limitations under the License. --> <merge xmlns:android="http://schemas.android.com/apk/res/android"> - <GridView + <com.android.gallery3d.ingest.ui.IngestGridView android:id="@+id/ingest_gridview" android:layout_width="match_parent" android:layout_height="match_parent" - android:columnWidth="200px" + android:columnWidth="120dip" android:numColumns="auto_fit" android:fastScrollEnabled="true" android:background="@android:color/background_dark" android:choiceMode="multipleChoiceModal" android:stretchMode="columnWidth" /> + <android.support.v4.view.ViewPager + android:id="@+id/ingest_view_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/background_dark" + android:visibility="invisible" /> + <LinearLayout - android:id="@+id/ingest_warning_overlay" + android:id="@+id/ingest_warning_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="20dip" android:gravity="center" android:orientation="horizontal" - android:visibility="gone" > + android:visibility="invisible" > <ImageView - android:id="@+id/ingest_warning_overlay_icon" + android:id="@+id/ingest_warning_view_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@android:drawable/ic_dialog_alert" /> <TextView - android:id="@+id/ingest_warning_overlay_text" + android:id="@+id/ingest_warning_view_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" diff --git a/res/layout/ingest_fullsize.xml b/res/layout/ingest_fullsize.xml new file mode 100644 index 000000000..4100ca13d --- /dev/null +++ b/res/layout/ingest_fullsize.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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.gallery3d.ingest.ui.MtpFullscreenView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + <com.android.gallery3d.ingest.ui.MtpImageView + android:id="@+id/ingest_fullsize_image" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:scaleType="centerInside" /> + + <CheckBox + android:id="@+id/ingest_fullsize_image_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentRight="true" + android:text="@string/Import" /> + +</com.android.gallery3d.ingest.ui.MtpFullscreenView>
\ No newline at end of file diff --git a/res/menu/ingest_menu_item_list_selection.xml b/res/menu/ingest_menu_item_list_selection.xml index aaf3262ed..2f020b671 100644 --- a/res/menu/ingest_menu_item_list_selection.xml +++ b/res/menu/ingest_menu_item_list_selection.xml @@ -14,6 +14,8 @@ limitations under the License. --> <menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/ingest_switch_view" + android:showAsAction="always" /> <item android:id="@+id/import_items" android:showAsAction="always|withText" android:title="@string/Import" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index d6b981528..fae3466cc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -503,6 +503,9 @@ <!-- Label for album grid button --> <string name="switch_photo_grid">Grid view</string> + <!-- Label for fullscreen button. [CHAR LIMIT=20] --> + <string name="switch_photo_fullscreen">Fullscreen view</string> + <!-- The tilte of a dialog showing trimming in progress. [CHAR LIMIT=20] --> <string name="trimming">Trimming</string> |