OSDN Git Service

Fix gap between camera controls and nav bar
[android-x86/packages-apps-Camera2.git] / res / layout / photo_module.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2013 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 <!-- This layout is shared by phone and tablet in both landscape and portrait
18  orientation. The purpose of having this layout is to eventually not manually
19  recreate views when the orientation changes, by migrating the views that do not
20  need to be recreated in onConfigurationChanged from old photo_module to this
21  layout. -->
22
23 <merge xmlns:android="http://schemas.android.com/apk/res/android"
24     android:layout_width="match_parent"
25     android:layout_height="match_parent"
26     android:layout_gravity="center">
27     <!-- Wrap a frame layout around texture view so that when scaled, texture
28          view will not draw outside its unscaled bounds -->
29     <FrameLayout
30         android:layout_width="match_parent"
31         android:layout_height="match_parent">
32         <TextureView
33             android:id="@+id/preview_content"
34             android:layout_width="match_parent"
35             android:layout_height="match_parent" />
36     </FrameLayout>
37     <View
38         android:id="@+id/flash_overlay"
39         android:layout_width="match_parent"
40         android:layout_height="match_parent"
41         android:background="@android:color/white"
42         android:visibility="gone"
43         android:alpha="0" />
44     <ViewStub android:id="@+id/face_view_stub"
45         android:inflatedId="@+id/face_view"
46         android:layout="@layout/face_view"
47         android:layout_width="match_parent"
48         android:layout_height="match_parent"
49         android:visibility="gone"/>
50     <com.android.camera.ui.RenderOverlay
51         android:id="@+id/render_overlay"
52         android:layout_width="match_parent"
53         android:layout_height="match_parent" />
54     <include layout="@layout/camera_controls"
55         android:layout_gravity="center"
56         style="@style/CameraControls"/>
57 </merge>