summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-07-17 15:18:00 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-17 15:18:00 -0700
commite1b7b87757cfef229162601154b0d62bbfb693a2 (patch)
tree0a40c965c702438f776bdee5430972869201622a /res/layout
parent3e830d1e1af68c6748ce7ca490e55ba5fee0e1ba (diff)
parent750173a4d20f1e8d6607edb3ada6be5166d0cd82 (diff)
downloadpackages_apps_LegacyCamera-e1b7b87757cfef229162601154b0d62bbfb693a2.zip
packages_apps_LegacyCamera-e1b7b87757cfef229162601154b0d62bbfb693a2.tar.gz
packages_apps_LegacyCamera-e1b7b87757cfef229162601154b0d62bbfb693a2.tar.bz2
Merge "Add a share application list in share popup."
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/review_thumbnail.xml25
-rw-r--r--res/layout/share_item.xml36
-rw-r--r--res/layout/share_popup.xml78
3 files changed, 111 insertions, 28 deletions
diff --git a/res/layout/review_thumbnail.xml b/res/layout/review_thumbnail.xml
index 1f8b344..f94a186 100644
--- a/res/layout/review_thumbnail.xml
+++ b/res/layout/review_thumbnail.xml
@@ -14,29 +14,22 @@
limitations under the License.
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/share_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
- android:orientation="vertical">
- <com.android.camera.ui.RotateImageView
- android:id="@+id/review_thumbnail"
+ android:orientation="vertical"
+ android:clickable="true"
+ android:focusable="false"
+ android:background="@drawable/border_last_picture">
+ <com.android.camera.ui.RotateImageView android:id="@+id/thumbnail"
android:layout_width="52dp"
- android:layout_height="52dp"
- android:clickable="true"
- android:focusable="false"
- android:background="@drawable/border_last_picture" />
- <com.android.camera.ui.RotateImageView
- android:id="@+id/btn_share"
+ android:layout_height="52dp"/>
+ <com.android.camera.ui.RotateImageView android:id="@+id/share_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:paddingTop="2dp"
- android:paddingBottom="2dp"
- android:clickable="true"
- android:focusable="false"
android:src="@drawable/ic_viewfinder_share"
android:background="@android:color/black" />
</LinearLayout> \ No newline at end of file
diff --git a/res/layout/share_item.xml b/res/layout/share_item.xml
new file mode 100644
index 0000000..e5b0b9e
--- /dev/null
+++ b/res/layout/share_item.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011 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.
+*/
+-->
+<!-- A row that contains an icon and the name of the app to share in a listview -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="4dp"
+ android:paddingRight="4dp">
+ <TextView android:id="@+id/text"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="left|center_vertical"
+ android:textAppearance="?android:textAppearanceMedium"
+ android:singleLine="true"
+ android:paddingLeft="4dp"
+ android:textColor="@android:color/white" />
+</LinearLayout>
diff --git a/res/layout/share_popup.xml b/res/layout/share_popup.xml
index 93ffd4b..06b0e2a 100644
--- a/res/layout/share_popup.xml
+++ b/res/layout/share_popup.xml
@@ -14,23 +14,77 @@
limitations under the License.
-->
-<RelativeLayout
+<!-- Use a full-screen popup window because UI has some intermediate problems
+ when its size is changed. -->
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.camera.ui.RotateLayout
- android:id="@+id/rotate_layout"
+ <!-- Need a relative layout here because collapse button does not rotate and
+ it is not in the thumbnail. -->
+ <RelativeLayout android:id="@+id/root"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true">
- <!-- The size of the thumbnail is calculated in SharePopup.java -->
- <ImageView
- android:id="@+id/expanded_thumbnail"
+ android:layout_gravity="top|bottom">
+ <com.android.camera.ui.RotateLayout
+ android:id="@+id/share_view_rotate_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:adjustViewBounds="true"
- android:scaleType="fitCenter" />
- </com.android.camera.ui.RotateLayout>
-</RelativeLayout>
+ android:layout_toLeftOf="@+id/thumbnail_rotate_layout">
+ <!-- The width of the share list is calculated in SharePopup.java. -->
+ <LinearLayout android:id="@+id/share_view"
+ android:layout_width="@dimen/share_list_width_landscape"
+ android:layout_height="@dimen/share_image_max_height_landscape"
+ android:orientation="vertical"
+ android:background="@color/dark_gray"
+ android:paddingLeft="7dp"
+ android:paddingRight="7dp"
+ android:clickable="true">
+ <TextView android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="44dp"
+ android:gravity="left|center_vertical"
+ android:textAppearance="?android:textAppearanceMedium"
+ android:text="@string/share_picture_via"
+ android:textColor="@android:color/white"
+ android:paddingLeft="4dp" />
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:scaleType="fitXY"
+ android:gravity="fill_horizontal"
+ android:src="@drawable/divider_strong_holo" />
+ <ListView android:id="@+id/share_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_gravity="center"
+ android:choiceMode="singleChoice"
+ style="@android:style/Widget.ListView" />
+ </LinearLayout>
+ </com.android.camera.ui.RotateLayout>
+ <com.android.camera.ui.RotateLayout
+ android:id="@+id/thumbnail_rotate_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true">
+ <!-- The size of the thumbnail is calculated in SharePopup.java -->
+ <ImageView android:id="@+id/thumbnail"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
+ android:scaleType="fitCenter"
+ android:background="@drawable/border_last_picture" />
+ </com.android.camera.ui.RotateLayout>
+ <ImageView android:id="@+id/collapse_button"
+ android:layout_width="56dp"
+ android:layout_height="56dp"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:src="@drawable/btn_ic_review_play"
+ android:scaleType="center" />
+ </RelativeLayout>
+</FrameLayout>