1<!--
2  Copyright 2012 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<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    android:id="@+id/container"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent">
21
22    <LinearLayout android:layout_width="match_parent"
23        android:layout_height="wrap_content"
24        android:orientation="vertical"
25        android:padding="16dp">
26
27        <TextView style="?android:textAppearanceSmall"
28            android:layout_width="wrap_content"
29            android:layout_height="wrap_content"
30            android:text="@string/message_zoom_touch_expand" />
31
32        <!-- This is an example layout containing thumbnail image buttons that, when pressed,
33             zoom in to show more detail. All of the zooming and animation logic is in
34             the ZoomActivity class. -->
35        <LinearLayout
36            android:layout_width="wrap_content"
37            android:layout_height="wrap_content"
38            android:layout_marginTop="16dp"
39            android:orientation="horizontal">
40
41            <!-- These buttons don't have any decorations (3D bevel, etc.), but it's still
42                 important to show feedback on touch or focus. The custom
43                 "ToughHighlightImageButton" ImageButton subclass helps achieve this by drawing
44                 the standard system "pressed" and "focused" overlay upon user interaction. -->
45
46            <com.example.android.animationsdemo.TouchHighlightImageButton
47                android:id="@+id/thumb_button_1"
48                android:layout_width="100dp"
49                android:layout_height="75dp"
50                android:layout_marginRight="1dp"
51                android:src="@drawable/thumb1"
52                android:scaleType="centerCrop"
53                android:contentDescription="@string/description_image_1" />
54
55            <com.example.android.animationsdemo.TouchHighlightImageButton
56                android:id="@+id/thumb_button_2"
57                android:layout_width="100dp"
58                android:layout_height="75dp"
59                android:src="@drawable/thumb2"
60                android:scaleType="centerCrop"
61                android:contentDescription="@string/description_image_2" />
62
63        </LinearLayout>
64
65    </LinearLayout>
66
67    <!-- This initially-hidden ImageView will hold the expanded/zoomed version of the
68         images above. Without transformations applied, it takes up the entire screen.
69         To achieve the "zoom" animation, this view's bounds are animated from the
70         bounds of the thumbnail buttons above, to its final laid-out bounds. The implementation
71         of this animation is in the ZoomActivity class. -->
72    <ImageView
73        android:id="@+id/expanded_image"
74        android:layout_width="match_parent"
75        android:layout_height="match_parent"
76        android:visibility="invisible"
77        android:contentDescription="@string/description_zoom_touch_close" />
78
79</FrameLayout>
80