1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 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 <!-- Adapted from frameworks/base/core/res/res/layout/alert_dialog_holo.xml. We 18 want a dialog, but it must be its own activity so we can launch the soft 19 keyboard on it. A regular dialog will not work since it would be launched from 20 the IME. --> 21 <ScrollView> 22 <LinearLayout 23 xmlns:android="http://schemas.android.com/apk/res/android" 24 android:layout_width="match_parent" 25 android:layout_height="match_parent" 26 android:layout_marginStart="8dip" 27 android:layout_marginEnd="8dip" 28 android:orientation="vertical"> 29 <LinearLayout 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:orientation="vertical"> 33 <View android:layout_width="match_parent" 34 android:layout_height="2dip" 35 android:visibility="gone" 36 android:background="@android:color/holo_blue_light" /> 37 <TextView 38 style="?android:attr/windowTitleStyle" 39 android:singleLine="true" 40 android:ellipsize="end" 41 android:layout_width="match_parent" 42 android:layout_height="wrap_content" 43 android:minHeight="64dip" 44 android:layout_marginLeft="16dip" 45 android:layout_marginRight="16dip" 46 android:gravity="center_vertical|left" 47 android:text="@string/research_feedback_dialog_title" /> 48 <View 49 android:layout_width="match_parent" 50 android:layout_height="2dip" 51 android:background="@android:color/holo_blue_light" /> 52 </LinearLayout> 53 54 <EditText 55 android:id="@+id/research_feedback_contents" 56 android:layout_height="wrap_content" 57 android:layout_width="match_parent" 58 android:layout_gravity="fill_horizontal|center_vertical" 59 android:layout_marginLeft="8dip" 60 android:layout_marginRight="8dip" 61 android:layout_marginBottom="8dip" 62 android:layout_marginTop="8dip" 63 android:minLines="2" 64 android:scrollbars="vertical" 65 android:hint="@string/research_feedback_hint" 66 android:inputType="textMultiLine|textCapSentences"> 67 <requestFocus /> 68 </EditText> 69 <CheckBox 70 android:id="@+id/research_feedback_include_account_name" 71 android:layout_height="wrap_content" 72 android:layout_width="match_parent" 73 android:layout_marginLeft="16dip" 74 android:layout_marginRight="16dip" 75 android:layout_marginBottom="8dip" 76 android:checked="false" 77 android:text="@string/research_feedback_include_account_name_label" /> 78 <CheckBox 79 android:id="@+id/research_feedback_include_recording_checkbox" 80 android:layout_height="wrap_content" 81 android:layout_width="match_parent" 82 android:layout_marginLeft="16dip" 83 android:layout_marginRight="16dip" 84 android:layout_marginBottom="8dip" 85 android:checked="false" 86 android:text="@string/research_feedback_include_recording_label" /> 87 <LinearLayout 88 android:layout_width="match_parent" 89 android:layout_height="wrap_content" 90 android:orientation="vertical" 91 android:divider="?android:attr/dividerHorizontal" 92 android:showDividers="beginning" 93 android:dividerPadding="0dip"> 94 <LinearLayout 95 style="?android:attr/buttonBarStyle" 96 android:layout_width="match_parent" 97 android:layout_height="wrap_content" 98 android:orientation="horizontal" 99 android:layoutDirection="locale" 100 android:measureWithLargestChild="true"> 101 <Button 102 android:id="@+id/research_feedback_cancel_button" 103 android:layout_width="wrap_content" 104 android:layout_gravity="left" 105 android:layout_weight="1" 106 android:maxLines="2" 107 style="?android:attr/buttonBarButtonStyle" 108 android:textSize="14sp" 109 android:text="@string/research_feedback_cancel" 110 android:layout_height="wrap_content" /> 111 <Button 112 android:id="@+id/research_feedback_send_button" 113 android:layout_width="wrap_content" 114 android:layout_gravity="right" 115 android:layout_weight="1" 116 android:maxLines="2" 117 style="?android:attr/buttonBarButtonStyle" 118 android:textSize="14sp" 119 android:text="@string/research_feedback_send" 120 android:layout_height="wrap_content" /> 121 </LinearLayout> 122 </LinearLayout> 123 </LinearLayout> 124 </ScrollView> 125