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 <LinearLayout 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 29 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:orientation="horizontal"> 33 34 <Button android:id="@+id/copy_styled_text" 35 android:layout_width="wrap_content" android:layout_height="wrap_content" 36 android:onClick="pasteStyledText" 37 android:text="@string/copy_text" /> 38 39 <TextView 40 android:id="@+id/styled_text" 41 android:layout_width="wrap_content" 42 android:layout_height="wrap_content" 43 android:gravity="center_horizontal" 44 android:textStyle="normal" /> 45 46 </LinearLayout> 47 48 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:orientation="horizontal"> 52 53 <Button android:id="@+id/copy_plain_text" 54 android:layout_width="wrap_content" android:layout_height="wrap_content" 55 android:onClick="pastePlainText" 56 android:text="@string/copy_text" /> 57 58 <TextView 59 android:id="@+id/plain_text" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:gravity="center_horizontal" 63 android:textStyle="normal" /> 64 65 </LinearLayout> 66 67 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 68 android:layout_width="match_parent" 69 android:layout_height="wrap_content" 70 android:orientation="horizontal"> 71 72 <Button android:id="@+id/copy_intent" 73 android:layout_width="wrap_content" android:layout_height="wrap_content" 74 android:onClick="pasteIntent" 75 android:text="@string/copy_intent" /> 76 77 <Button android:id="@+id/copy_uri" 78 android:layout_width="wrap_content" android:layout_height="wrap_content" 79 android:onClick="pasteUri" 80 android:text="@string/copy_uri" /> 81 82 </LinearLayout> 83 84 <Spinner android:id="@+id/clip_type" 85 android:layout_width="match_parent" 86 android:layout_height="wrap_content" 87 android:drawSelectorOnTop="true" 88 android:prompt="@string/clip_type_prompt" 89 /> 90 91 <TextView 92 android:id="@+id/clip_mime_types" 93 android:layout_width="match_parent" 94 android:layout_height="wrap_content" 95 android:layout_weight="0" 96 android:textStyle="normal" 97 /> 98 99 <EditText 100 android:id="@+id/clip_text" 101 android:layout_width="match_parent" 102 android:layout_height="0px" 103 android:layout_weight="1" 104 android:textStyle="normal" 105 /> 106 107 </LinearLayout> 108