summaryrefslogtreecommitdiffstats
path: root/res/layout/mediapicker_camera_chooser.xml
blob: 27d26bd0a0f56ee049794c2f1f96fc36f68221e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2015 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.
-->

<com.android.messaging.ui.mediapicker.CameraMediaChooserView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/black">

    <FrameLayout
        android:id="@+id/mediapicker_enabled"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <!-- Default to using the hardware rendered camera preview, we will fall back to
        SoftwareCameraPreview in CameraMediaChooserView if needed -->
        <com.android.messaging.ui.mediapicker.HardwareCameraPreview
            android:id="@+id/camera_preview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center" />

        <com.android.messaging.ui.mediapicker.camerafocus.RenderOverlay
            android:id="@+id/focus_visual"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <View
            android:id="@+id/camera_shutter_visual"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/white"
            android:visibility="gone" />

        <!-- Need a background on this view in order for the ripple effect to have a place to draw -->
        <FrameLayout
            android:id="@+id/camera_button_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:paddingTop="20dp"
            android:layout_gravity="bottom">

            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="start|center_vertical"
                style="@style/CameraChooserFrameStyle">

                <ImageButton
                    android:id="@+id/camera_swap_mode_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:minWidth="48dp"
                    android:minHeight="48dp"
                    android:background="@drawable/transparent_button_background"
                    android:src="@drawable/ic_mp_video_small_light"
                    android:contentDescription="@string/camera_switch_to_video_mode"/>

                <Chronometer
                    android:id="@+id/camera_video_counter"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@android:color/white"
                    android:textSize="18sp"
                    android:padding="16dp"
                    android:visibility="gone" />

            </FrameLayout>

            <ImageButton
                android:id="@+id/camera_capture_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:minWidth="96dp"
                android:minHeight="96dp"
                android:background="@drawable/transparent_button_background"
                android:src="@drawable/ic_checkmark_large_light"
                android:contentDescription="@string/camera_take_picture"/>

            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end|center_vertical"
                android:paddingEnd="16dp">

                <ImageButton
                    android:id="@+id/camera_fullScreen_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:minWidth="48dp"
                    android:minHeight="48dp"
                    android:background="@drawable/transparent_button_background"
                    android:src="@drawable/ic_mp_full_screen_light"
                    android:contentDescription="@string/camera_switch_full_screen" />

                <ImageButton
                    android:id="@+id/camera_swapCamera_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:minWidth="48dp"
                    android:minHeight="48dp"
                    android:background="@drawable/transparent_button_background"
                    android:visibility="gone"
                    android:contentDescription="@string/camera_switch_camera_facing"/>

                <ImageButton
                    android:id="@+id/camera_cancel_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:minWidth="48dp"
                    android:minHeight="48dp"
                    android:background="@drawable/transparent_button_background"
                    android:src="@drawable/ic_remove_small_light"
                    android:visibility="gone"
                    android:contentDescription="@string/camera_cancel_recording" />

            </FrameLayout>

        </FrameLayout>

    </FrameLayout>

    <!-- This view will hide all other views if the required permission is not granted -->
    <TextView
        android:id="@+id/missing_permission_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="@string/enable_permission_procedure"
        android:contentDescription="@string/enable_permission_procedure_description"
        android:background="@android:color/white"
        android:gravity="center"
        android:visibility="gone" />

</com.android.messaging.ui.mediapicker.CameraMediaChooserView>