summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-08-24 23:34:35 +0800
committerWu-cheng Li <wuchengli@google.com>2011-08-28 16:27:01 +0800
commit7097299bb13ba2e8defca40e82bc7b28982a41cf (patch)
tree6b9f2332c1366d8a3392bb8bb3701942ff601759 /res/layout
parent5f47cc1a9ce83a5656751df5705674a1711687d1 (diff)
downloadpackages_apps_LegacyCamera-7097299bb13ba2e8defca40e82bc7b28982a41cf.zip
packages_apps_LegacyCamera-7097299bb13ba2e8defca40e82bc7b28982a41cf.tar.gz
packages_apps_LegacyCamera-7097299bb13ba2e8defca40e82bc7b28982a41cf.tar.bz2
Add applicaton icons to share popup.
bug:5157438 Change-Id: I9ed34ae1f4b2058a7ec0f7a29ae9196c84a24a72
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/share_icon.xml27
-rw-r--r--res/layout/share_item.xml36
-rw-r--r--res/layout/share_popup.xml67
3 files changed, 46 insertions, 84 deletions
diff --git a/res/layout/share_icon.xml b/res/layout/share_icon.xml
new file mode 100644
index 0000000..7ab2e3b
--- /dev/null
+++ b/res/layout/share_icon.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/share_item_height">
+ <com.android.camera.ui.RotateLayout android:id="@+id/share_icon_rotate_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center">
+ <ImageView android:id="@+id/icon"
+ android:layout_width="@dimen/share_icon_length"
+ android:layout_height="@dimen/share_icon_length"/>
+ </com.android.camera.ui.RotateLayout>
+</FrameLayout>
diff --git a/res/layout/share_item.xml b/res/layout/share_item.xml
deleted file mode 100644
index e5b0b9e..0000000
--- a/res/layout/share_item.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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 16dab6e..e069595 100644
--- a/res/layout/share_popup.xml
+++ b/res/layout/share_popup.xml
@@ -22,63 +22,34 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dim_background">
- <!-- Need a relative layout here because collapse button does not rotate and
- it is not in the thumbnail. -->
- <RelativeLayout android:id="@+id/root"
+ <FrameLayout android:id="@+id/share_view"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- 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: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>
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:background="@drawable/border_last_picture">
<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">
+ android:layout_gravity="center">
<!-- 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" />
+ android:scaleType="fitCenter"/>
</com.android.camera.ui.RotateLayout>
- </RelativeLayout>
+ <FrameLayout
+ android:layout_width="@dimen/share_item_width"
+ android:layout_height="match_parent"
+ android:layout_gravity="right"
+ android:background="@color/dim_background">
+ <ListView android:id="@+id/share_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:choiceMode="singleChoice"
+ style="@android:style/Widget.Holo.ListView" />
+ </FrameLayout>
+ </FrameLayout>
</FrameLayout>