video_camera.xml revision 33e3e0b3f4f1f54e067bbc54c9b8b5a26660f9f0
1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2007 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<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="fill_parent" 19 android:layout_height="fill_parent" 20 android:orientation="horizontal"> 21 22 <com.android.camera.VideoPreview 23 android:id="@+id/camera_preview" 24 android:layout_width="fill_parent" 25 android:layout_height="fill_parent" 26 android:layout_centerInParent="true" 27 /> 28 29 <ImageView 30 android:id="@+id/video_frame" 31 android:layout_width="fill_parent" 32 android:layout_height="fill_parent" 33 android:visibility="gone" 34 /> 35 36 <ImageView 37 android:id="@+id/blackout" 38 android:layout_width="fill_parent" 39 android:layout_height="fill_parent" 40 android:visibility="invisible" 41 /> 42 43 <ImageView 44 android:id="@+id/mode_indicator" 45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" 47 android:src="@drawable/ic_camera_indicator_video" 48 android:background="@drawable/ic_btn_camera_background" 49 android:clickable="true" 50 android:focusable="true" 51 android:layout_alignParentRight="true" 52 android:layout_alignParentTop="true" 53 android:layout_marginRight="50dip" 54 android:layout_marginTop="10dip" 55 android:scaleType="center"/> 56 57 <ImageView 58 android:id="@+id/recording_indicator" 59 android:layout_width="wrap_content" 60 android:layout_height="wrap_content" 61 android:src="@drawable/ic_camera_bar_indicator_record" 62 android:background="@drawable/ic_btn_camera_background" 63 android:clickable="true" 64 android:focusable="true" 65 android:layout_alignParentRight="true" 66 android:layout_alignParentTop="true" 67 android:layout_marginRight="50dip" 68 android:layout_marginTop="10dip" 69 android:scaleType="center" 70 android:visibility="gone"/> 71 72 <!-- Note: In this TextView the paddingRight="2" 73 attribute is required because otherwise the 74 text's drop shadow will be clipped. --> 75 <TextView 76 android:id="@+id/recording_time" 77 android:layout_width="90dip" 78 android:layout_height="wrap_content" 79 android:layout_toLeftOf="@id/recording_indicator" 80 android:layout_alignTop="@id/recording_indicator" 81 android:layout_marginTop="20dip" 82 android:layout_marginRight="6dip" 83 android:paddingRight="2dip" 84 android:shadowColor="#c0000000" 85 android:shadowDx="1" 86 android:shadowDy="1" 87 android:shadowRadius="1" 88 android:gravity="right" 89 android:textColor="#ffffffff" 90 android:textSize="20dip" 91 android:textStyle="bold" 92 android:visibility="gone"/> 93 94 <TextView 95 android:id="@+id/hint_toast" 96 android:layout_alignParentRight="true" 97 android:layout_alignParentTop="true" 98 android:background="@drawable/popup_camera_toast" 99 android:layout_width="200dip" 100 android:layout_height="wrap_content" 101 android:gravity="center" 102 android:text="@string/video_camera_button_hint" 103 android:textSize="18sp"/> 104 105 <LinearLayout 106 android:visibility="gone" 107 android:id="@+id/post_picture_panel" 108 android:layout_alignTop="@id/mode_indicator" 109 android:layout_toLeftOf="@id/mode_indicator" 110 android:paddingLeft="7dip" 111 android:paddingRight="15dip" 112 android:layout_width="wrap_content" 113 android:layout_height="wrap_content" 114 android:orientation="horizontal"> 115 116 <com.android.camera.ActionMenuButton 117 android:id="@+id/play" 118 android:drawableTop="@drawable/ic_menu_camera_play" 119 android:layout_width="wrap_content" 120 android:layout_height="wrap_content" 121 android:text="@string/camera_play" 122 style="@style/OnscreenActionIcon" 123 /> 124 <com.android.camera.ActionMenuButton 125 android:id="@+id/share" 126 android:drawableTop="@drawable/ic_menu_share" 127 android:layout_width="wrap_content" 128 android:layout_height="wrap_content" 129 android:text="@string/camera_share" 130 style="@style/OnscreenActionIcon" 131 /> 132 <com.android.camera.ActionMenuButton 133 android:id="@+id/discard" 134 android:drawableTop="@drawable/ic_menu_delete" 135 android:layout_width="fill_parent" 136 android:layout_height="fill_parent" 137 android:text="@string/camera_toss" 138 style="@style/OnscreenActionIcon" 139 /> 140 <com.android.camera.ActionMenuButton 141 android:id="@+id/attach" 142 android:drawableTop="@drawable/ic_menu_attach" 143 android:layout_width="wrap_content" 144 android:layout_height="wrap_content" 145 android:text="@string/camera_attach" 146 style="@style/OnscreenActionIcon" 147 /> 148 <com.android.camera.ActionMenuButton 149 android:id="@+id/cancel" 150 android:drawableTop="@drawable/ic_menu_cancel" 151 android:layout_width="wrap_content" 152 android:layout_height="wrap_content" 153 android:text="@string/camera_cancel" 154 style="@style/OnscreenActionIcon" 155 /> 156 </LinearLayout> 157</RelativeLayout> 158 159