The Android Open Source Project | f805710 | 2009-03-15 16:47:16 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2008 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 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 18 | android:layout_width="match_parent" |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 19 | android:layout_height="match_parent" |
| 20 | android:id="@+id/layout_textviewtest"> |
| 21 | |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 22 | <ScrollView android:layout_width="match_parent" |
| 23 | android:layout_height="match_parent"> |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 24 | |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 25 | <LinearLayout android:orientation="vertical" |
| 26 | android:layout_width="match_parent" |
| 27 | android:layout_height="match_parent"> |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 28 | |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 29 | <TextView android:id="@+id/textview_textAttr" |
| 30 | android:text="@string/text_view_hello" |
| 31 | android:textColor="@drawable/black" |
| 32 | android:textColorHighlight="@drawable/yellow" |
| 33 | android:textColorHint="@drawable/red" |
| 34 | android:textColorLink="@drawable/blue" |
| 35 | android:textScaleX="1.2" |
Peter Eliasson | 1193519 | 2012-04-23 13:40:18 +0200 | [diff] [blame] | 36 | android:typeface="normal" |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 37 | android:textSize="20px" |
| 38 | android:textStyle="normal" |
Alan Viverette | c02a9f4 | 2014-09-16 16:09:22 -0700 | [diff] [blame] | 39 | android:textAppearance="@null" |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 40 | android:layout_width="wrap_content" |
| 41 | android:layout_height="wrap_content"/> |
| 42 | |
| 43 | <TextView android:id="@+id/textview_password" |
| 44 | android:password="true" |
| 45 | android:layout_width="wrap_content" |
| 46 | android:layout_height="wrap_content"/> |
| 47 | |
| 48 | <TextView android:id="@+id/textview_singleLine" |
| 49 | android:singleLine="true" |
| 50 | android:layout_width="wrap_content" |
| 51 | android:layout_height="wrap_content"/> |
| 52 | |
| 53 | <TextView android:id="@+id/textview_text" |
| 54 | android:text="@string/text_view_hello" |
| 55 | android:layout_width="wrap_content" |
| 56 | android:layout_height="wrap_content"/> |
Fabrice Di Meglio | fb0961a | 2011-09-29 16:06:44 -0700 | [diff] [blame] | 57 | |
| 58 | <TextView android:id="@+id/textview_text_two_lines" |
| 59 | android:text="@string/text_view_hello_two_lines" |
| 60 | android:layout_width="wrap_content" |
| 61 | android:layout_height="wrap_content"/> |
Fabrice Di Meglio | 41f2159 | 2011-10-03 17:00:19 -0700 | [diff] [blame] | 62 | |
| 63 | <android.widget.cts.MockTextView |
| 64 | android:id="@+id/mock_textview_left" |
| 65 | android:layout_width="wrap_content" |
| 66 | android:layout_height="wrap_content" |
| 67 | android:requiresFadingEdge="horizontal" |
| 68 | android:singleLine="true" |
| 69 | android:text="@string/long_text" |
| 70 | android:gravity="left" |
| 71 | /> |
| 72 | |
| 73 | <android.widget.cts.MockTextView |
| 74 | android:id="@+id/mock_textview_right" |
| 75 | android:layout_width="wrap_content" |
| 76 | android:layout_height="wrap_content" |
| 77 | android:requiresFadingEdge="horizontal" |
| 78 | android:singleLine="true" |
| 79 | android:text="@string/long_text" |
| 80 | android:gravity="right" |
| 81 | /> |
| 82 | |
| 83 | <android.widget.cts.MockTextView |
| 84 | android:id="@+id/mock_textview_center" |
| 85 | android:layout_width="wrap_content" |
| 86 | android:layout_height="wrap_content" |
| 87 | android:requiresFadingEdge="horizontal" |
| 88 | android:singleLine="true" |
| 89 | android:text="@string/long_text" |
| 90 | android:gravity="center" |
| 91 | /> |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 92 | </LinearLayout> |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 93 | |
cci | 20f1f73 | 2011-01-08 21:23:05 +0800 | [diff] [blame] | 94 | </ScrollView> |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 95 | |
Fabrice Di Meglio | 9776f67 | 2013-03-18 18:15:23 -0700 | [diff] [blame] | 96 | <TextView android:id="@+id/textview_ltr" |
| 97 | android:layout_height="wrap_content" |
| 98 | android:layout_width="wrap_content"/> |
| 99 | |
Fabrice Di Meglio | 94c9437 | 2012-03-05 16:13:37 -0800 | [diff] [blame] | 100 | <TextView android:id="@+id/textview_rtl" |
| 101 | android:layout_height="wrap_content" |
| 102 | android:layout_width="wrap_content"/> |
| 103 | |
Fabrice Di Meglio | b44fc86 | 2012-10-26 13:33:36 -0700 | [diff] [blame] | 104 | <TextView android:id="@+id/textview_drawable_1_1" |
| 105 | android:layout_height="wrap_content" |
| 106 | android:layout_width="wrap_content" |
| 107 | android:drawableLeft="@drawable/icon_blue" |
| 108 | android:drawableRight="@drawable/icon_red" |
| 109 | android:drawableTop="@drawable/icon_green" |
| 110 | android:drawableBottom="@drawable/icon_yellow" |
| 111 | /> |
| 112 | |
| 113 | <TextView android:id="@+id/textview_drawable_1_2" |
| 114 | android:layout_height="wrap_content" |
| 115 | android:layout_width="wrap_content" |
| 116 | android:drawableLeft="@drawable/icon_blue" |
| 117 | android:drawableRight="@drawable/icon_red" |
| 118 | android:drawableTop="@drawable/icon_green" |
| 119 | android:drawableBottom="@drawable/icon_yellow" |
| 120 | android:layoutDirection="rtl" |
| 121 | /> |
| 122 | |
| 123 | <TextView android:id="@+id/textview_drawable_2_1" |
| 124 | android:layout_height="wrap_content" |
| 125 | android:layout_width="wrap_content" |
| 126 | android:drawableStart="@drawable/icon_blue" |
| 127 | android:drawableEnd="@drawable/icon_red" |
| 128 | android:drawableTop="@drawable/icon_green" |
| 129 | android:drawableBottom="@drawable/icon_yellow" |
| 130 | /> |
| 131 | |
| 132 | <TextView android:id="@+id/textview_drawable_2_2" |
| 133 | android:layout_height="wrap_content" |
| 134 | android:layout_width="wrap_content" |
| 135 | android:drawableStart="@drawable/icon_blue" |
| 136 | android:drawableEnd="@drawable/icon_red" |
| 137 | android:drawableTop="@drawable/icon_green" |
| 138 | android:drawableBottom="@drawable/icon_yellow" |
| 139 | android:layoutDirection="rtl" |
| 140 | /> |
| 141 | |
| 142 | <TextView android:id="@+id/textview_drawable_3_1" |
| 143 | android:layout_height="wrap_content" |
| 144 | android:layout_width="wrap_content" |
| 145 | android:drawableLeft="@drawable/icon_black" |
| 146 | android:drawableRight="@drawable/icon_black" |
| 147 | android:drawableStart="@drawable/icon_blue" |
| 148 | android:drawableEnd="@drawable/icon_red" |
| 149 | android:drawableTop="@drawable/icon_green" |
| 150 | android:drawableBottom="@drawable/icon_yellow" |
| 151 | /> |
| 152 | |
| 153 | <TextView android:id="@+id/textview_drawable_3_2" |
| 154 | android:layout_height="wrap_content" |
| 155 | android:layout_width="wrap_content" |
| 156 | android:drawableLeft="@drawable/icon_black" |
| 157 | android:drawableRight="@drawable/icon_black" |
| 158 | android:drawableStart="@drawable/icon_blue" |
| 159 | android:drawableEnd="@drawable/icon_red" |
| 160 | android:drawableTop="@drawable/icon_green" |
| 161 | android:drawableBottom="@drawable/icon_yellow" |
| 162 | android:layoutDirection="rtl" |
| 163 | /> |
| 164 | |
| 165 | |
| 166 | <LinearLayout android:orientation="vertical" |
| 167 | android:layout_width="match_parent" |
| 168 | android:layout_height="match_parent" |
| 169 | android:layoutDirection="ltr"> |
| 170 | |
| 171 | <TextView android:id="@+id/textview_drawable_4_1" |
| 172 | android:layout_height="wrap_content" |
| 173 | android:layout_width="wrap_content" |
| 174 | android:drawableStart="@drawable/icon_blue" |
| 175 | android:drawableEnd="@drawable/icon_red" |
| 176 | android:drawableTop="@drawable/icon_green" |
| 177 | android:drawableBottom="@drawable/icon_yellow" |
| 178 | /> |
| 179 | |
| 180 | <TextView android:id="@+id/textview_drawable_5_1" |
| 181 | android:layout_height="wrap_content" |
| 182 | android:layout_width="wrap_content" |
| 183 | android:drawableLeft="@drawable/icon_black" |
| 184 | android:drawableRight="@drawable/icon_black" |
| 185 | android:drawableStart="@drawable/icon_blue" |
| 186 | android:drawableEnd="@drawable/icon_red" |
| 187 | android:drawableTop="@drawable/icon_green" |
| 188 | android:drawableBottom="@drawable/icon_yellow" |
| 189 | /> |
| 190 | |
| 191 | </LinearLayout> |
| 192 | |
| 193 | <LinearLayout android:orientation="vertical" |
| 194 | android:layout_width="match_parent" |
| 195 | android:layout_height="match_parent" |
| 196 | android:layoutDirection="rtl"> |
| 197 | |
| 198 | <TextView android:id="@+id/textview_drawable_4_2" |
| 199 | android:layout_height="wrap_content" |
| 200 | android:layout_width="wrap_content" |
| 201 | android:drawableStart="@drawable/icon_blue" |
| 202 | android:drawableEnd="@drawable/icon_red" |
| 203 | android:drawableTop="@drawable/icon_green" |
| 204 | android:drawableBottom="@drawable/icon_yellow" |
| 205 | /> |
| 206 | |
| 207 | <TextView android:id="@+id/textview_drawable_5_2" |
| 208 | android:layout_height="wrap_content" |
| 209 | android:layout_width="wrap_content" |
| 210 | android:drawableLeft="@drawable/icon_black" |
| 211 | android:drawableRight="@drawable/icon_black" |
| 212 | android:drawableStart="@drawable/icon_blue" |
| 213 | android:drawableEnd="@drawable/icon_red" |
| 214 | android:drawableTop="@drawable/icon_green" |
| 215 | android:drawableBottom="@drawable/icon_yellow" |
| 216 | /> |
| 217 | |
| 218 | </LinearLayout> |
| 219 | |
The Android Open Source Project | f805710 | 2009-03-15 16:47:16 -0700 | [diff] [blame] | 220 | </LinearLayout> |