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<!-- 18 Demonstrates clipboard. 19 20 See corresponding Java code: 21 com.example.android.apis.content.ClipboardSample 22--> 23 24<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 25 android:layout_width="match_parent" 26 android:layout_height="match_parent" 27 android:orientation="vertical"> 28 <LinearLayout android:layout_width="match_parent" 29 android:layout_height="wrap_content" 30 android:orientation="vertical"> 31 32 <LinearLayout 33 android:layout_width="match_parent" 34 android:layout_height="wrap_content" 35 android:orientation="horizontal"> 36 37 <Button android:id="@+id/copy_styled_text" 38 android:layout_width="wrap_content" android:layout_height="wrap_content" 39 android:onClick="pasteStyledText" 40 android:text="@string/copy_text" /> 41 42 <TextView 43 android:id="@+id/styled_text" 44 android:layout_width="wrap_content" 45 android:layout_height="wrap_content" 46 android:textStyle="normal" /> 47 48 </LinearLayout> 49 50 <LinearLayout 51 android:layout_width="match_parent" 52 android:layout_height="wrap_content" 53 android:orientation="horizontal"> 54 55 <Button android:id="@+id/copy_plain_text" 56 android:layout_width="wrap_content" android:layout_height="wrap_content" 57 android:onClick="pastePlainText" 58 android:text="@string/copy_text" /> 59 60 <TextView 61 android:id="@+id/plain_text" 62 android:layout_width="wrap_content" 63 android:layout_height="wrap_content" 64 android:textStyle="normal" /> 65 66 </LinearLayout> 67 68 <LinearLayout 69 android:layout_width="match_parent" 70 android:layout_height="wrap_content" 71 android:orientation="horizontal"> 72 73 <Button android:id="@+id/copy_html_text" 74 android:layout_width="wrap_content" android:layout_height="wrap_content" 75 android:onClick="pasteHtmlText" 76 android:text="@string/copy_text" /> 77 78 <TextView 79 android:id="@+id/html_text" 80 android:layout_width="wrap_content" 81 android:layout_height="wrap_content" 82 android:textStyle="normal" /> 83 84 </LinearLayout> 85 86 <LinearLayout 87 android:layout_width="match_parent" 88 android:layout_height="wrap_content" 89 android:orientation="horizontal"> 90 91 <Button android:id="@+id/copy_intent" 92 android:layout_width="wrap_content" android:layout_height="wrap_content" 93 android:onClick="pasteIntent" 94 android:text="@string/copy_intent" /> 95 96 <Button android:id="@+id/copy_uri" 97 android:layout_width="wrap_content" android:layout_height="wrap_content" 98 android:onClick="pasteUri" 99 android:text="@string/copy_uri" /> 100 101 </LinearLayout> 102 103 <LinearLayout 104 android:layout_width="match_parent" 105 android:layout_height="wrap_content" 106 android:layout_marginTop="8dp" 107 android:orientation="horizontal"> 108 109 <TextView 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 android:textAppearance="?android:attr/textAppearanceMedium" 113 android:text="Data type: " /> 114 115 <Spinner android:id="@+id/clip_type" 116 android:layout_width="wrap_content" 117 android:layout_height="wrap_content" 118 android:drawSelectorOnTop="true" 119 android:prompt="@string/clip_type_prompt" 120 /> 121 122 </LinearLayout> 123 124 <LinearLayout 125 android:layout_width="match_parent" 126 android:layout_height="wrap_content" 127 android:layout_marginTop="4dp" 128 android:orientation="horizontal"> 129 130 <TextView 131 android:layout_width="wrap_content" 132 android:layout_height="wrap_content" 133 android:textAppearance="?android:attr/textAppearanceMedium" 134 android:text="MIME types: " /> 135 136 <TextView 137 android:id="@+id/clip_mime_types" 138 android:layout_width="0dp" 139 android:layout_weight="1" 140 android:layout_height="wrap_content" 141 android:background="#ff303030" 142 android:padding="4dp" 143 android:textAppearance="?android:attr/textAppearanceMedium" 144 /> 145 146 </LinearLayout> 147 148 <TextView 149 android:layout_width="wrap_content" 150 android:layout_height="wrap_content" 151 android:layout_marginTop="4dp" 152 android:textAppearance="?android:attr/textAppearanceMedium" 153 android:text="Data content:" /> 154 155 <TextView 156 android:id="@+id/clip_text" 157 android:layout_width="match_parent" 158 android:layout_height="wrap_content" 159 android:background="#ff303030" 160 android:padding="4dp" 161 android:textAppearance="?android:attr/textAppearanceMedium" 162 /> 163 164 </LinearLayout> 165</ScrollView>