share_popup.xml revision a321cfdb0803653ba895485f87493290273f26d2
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<!-- Use a full-screen popup window because UI has some intermediate problems
18     when its size is changed. -->
19<FrameLayout
20        xmlns:android="http://schemas.android.com/apk/res/android"
21        xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
22        android:layout_width="match_parent"
23        android:layout_height="match_parent"
24        android:background="@color/dim_background">
25    <!-- Need a relative layout here because collapse button does not rotate and
26         it is not in the thumbnail. -->
27    <RelativeLayout android:id="@+id/root"
28            android:layout_width="wrap_content"
29            android:layout_height="wrap_content"
30            android:layout_gravity="top|bottom">
31        <com.android.camera.ui.RotateLayout
32                android:id="@+id/share_view_rotate_layout"
33                android:layout_width="wrap_content"
34                android:layout_height="wrap_content"
35                android:layout_toLeftOf="@+id/thumbnail_rotate_layout">
36            <!-- The width of the share list is calculated in SharePopup.java. -->
37            <LinearLayout android:id="@+id/share_view"
38                    android:layout_width="@dimen/share_list_width_landscape"
39                    android:layout_height="@dimen/share_image_max_height_landscape"
40                    android:orientation="vertical"
41                    android:background="@color/dark_gray"
42                    android:paddingLeft="7dp"
43                    android:paddingRight="7dp"
44                    android:clickable="true">
45                <TextView android:id="@+id/title"
46                        android:layout_width="match_parent"
47                        android:layout_height="wrap_content"
48                        android:minHeight="44dp"
49                        android:gravity="left|center_vertical"
50                        android:textAppearance="?android:textAppearanceMedium"
51                        android:text="@string/share_picture_via"
52                        android:textColor="@android:color/white"
53                        android:paddingLeft="4dp" />
54                <ImageView
55                        android:layout_width="match_parent"
56                        android:layout_height="1dip"
57                        android:scaleType="fitXY"
58                        android:gravity="fill_horizontal"
59                        android:src="@drawable/divider_strong_holo" />
60                <ListView android:id="@+id/share_list"
61                        android:layout_width="match_parent"
62                        android:layout_height="wrap_content"
63                        android:orientation="vertical"
64                        android:layout_gravity="center"
65                        android:choiceMode="singleChoice"
66                        style="@android:style/Widget.ListView" />
67            </LinearLayout>
68        </com.android.camera.ui.RotateLayout>
69        <com.android.camera.ui.RotateLayout
70                android:id="@+id/thumbnail_rotate_layout"
71                android:layout_width="wrap_content"
72                android:layout_height="wrap_content"
73                android:layout_alignParentTop="true"
74                android:layout_alignParentRight="true">
75            <!-- The size of the thumbnail is calculated in SharePopup.java -->
76            <ImageView android:id="@+id/thumbnail"
77                    android:layout_width="wrap_content"
78                    android:layout_height="wrap_content"
79                    android:adjustViewBounds="true"
80                    android:scaleType="fitCenter"
81                    android:background="@drawable/border_last_picture" />
82        </com.android.camera.ui.RotateLayout>
83    </RelativeLayout>
84</FrameLayout>
85