1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 /* 4 ** 5 ** Copyright 2011, The Android Open Source Project 6 ** 7 ** Licensed under the Apache License, Version 2.0 (the "License"); 8 ** you may not use this file except in compliance with the License. 9 ** You may obtain a copy of the License at 10 ** 11 ** http://www.apache.org/licenses/LICENSE-2.0 12 ** 13 ** Unless required by applicable law or agreed to in writing, software 14 ** distributed under the License is distributed on an "AS IS" BASIS, 15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 ** See the License for the specific language governing permissions and 17 ** limitations under the License. 18 */ 19 --> 20 <RelativeLayout 21 xmlns:android="http://schemas.android.com/apk/res/android" 22 android:layout_height="wrap_content" 23 android:layout_width="match_parent" 24 android:background="@drawable/background_voice"> 25 <LinearLayout 26 xmlns:android="http://schemas.android.com/apk/res/android" 27 android:id="@+id/popup_layout" 28 android:orientation="vertical" 29 android:layout_height="371dip" 30 android:layout_width="500dip" 31 android:layout_centerInParent="true" 32 android:background="@drawable/vs_dialog_red"> 33 <TextView 34 android:id="@+id/text" 35 android:text="@string/voice_error" 36 android:layout_height="wrap_content" 37 android:layout_width="wrap_content" 38 android:singleLine="true" 39 android:layout_marginTop="10dip" 40 android:textSize="28sp" 41 android:textColor="#ffffff" 42 android:layout_gravity="center" 43 android:visibility="invisible"/> 44 <RelativeLayout 45 android:layout_height="0dip" 46 android:layout_width="match_parent" 47 android:layout_weight="1.0"> 48 <com.android.inputmethod.deprecated.voice.SoundIndicator 49 android:id="@+id/sound_indicator" 50 android:src="@drawable/mic_full" 51 android:background="@drawable/mic_base" 52 android:adjustViewBounds="true" 53 android:layout_height="wrap_content" 54 android:layout_width="wrap_content" 55 android:layout_centerInParent="true" 56 android:visibility="gone"/> 57 <ImageView 58 android:id="@+id/image" 59 android:src="@drawable/mic_slash" 60 android:layout_height="wrap_content" 61 android:layout_width="wrap_content" 62 android:layout_centerInParent="true" 63 android:visibility="visible"/> 64 <ProgressBar 65 android:id="@+id/progress" 66 android:indeterminate="true" 67 android:indeterminateOnly="false" 68 android:layout_height="60dip" 69 android:layout_width="60dip" 70 android:layout_centerInParent="true" 71 android:visibility="gone"/> 72 </RelativeLayout> 73 <!-- 74 The text is set by the code. We specify a random text (voice_error), so the 75 text view does not have a zero height. This is necessary to keep the slash 76 mic and the recording mic is the same position 77 --> 78 <TextView 79 android:id="@+id/language" 80 android:text="@string/voice_error" 81 android:layout_height="wrap_content" 82 android:layout_width="wrap_content" 83 android:singleLine="true" 84 android:textSize="14sp" 85 android:layout_marginBottom="3dip" 86 android:layout_gravity="center" 87 android:textColor="#ffffff" 88 android:visibility="invisible"/> 89 <Button 90 android:id="@+id/button" 91 android:layout_width="match_parent" 92 android:layout_height="54dip" 93 android:singleLine="true" 94 android:focusable="true" 95 android:text="@string/cancel" 96 android:layout_gravity="center_horizontal" 97 android:background="@drawable/btn_center" 98 android:textColor="#ffffff" 99 android:textSize="19sp" /> 100 </LinearLayout> 101 </RelativeLayout> 102