Home | History | Annotate | Download | only in layout
      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"
     18         android:layout_width="match_parent"
     19         android:layout_height="match_parent"
     20         android:id="@+id/layout_textviewtest">
     21 
     22     <ScrollView android:layout_width="match_parent"
     23             android:layout_height="match_parent">
     24 
     25         <LinearLayout android:orientation="vertical"
     26                 android:layout_width="match_parent"
     27                 android:layout_height="match_parent">
     28 
     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"
     36                     android:typeface="normal"
     37                     android:textSize="20px"
     38                     android:textStyle="normal"
     39                     android:layout_width="wrap_content"
     40                     android:layout_height="wrap_content"/>
     41         
     42             <TextView android:id="@+id/textview_password"
     43                     android:password="true"
     44                     android:layout_width="wrap_content"
     45                     android:layout_height="wrap_content"/>
     46         
     47             <TextView android:id="@+id/textview_singleLine"
     48                     android:singleLine="true"
     49                     android:layout_width="wrap_content"
     50                     android:layout_height="wrap_content"/>
     51         
     52             <TextView android:id="@+id/textview_text"
     53                     android:text="@string/text_view_hello"
     54                     android:layout_width="wrap_content"
     55                     android:layout_height="wrap_content"/>
     56 
     57             <TextView android:id="@+id/textview_text_two_lines"
     58                     android:text="@string/text_view_hello_two_lines"
     59                     android:layout_width="wrap_content"
     60                     android:layout_height="wrap_content"/>
     61 
     62             <android.widget.cts.MockTextView
     63                     android:id="@+id/mock_textview_left"
     64                     android:layout_width="wrap_content"
     65                     android:layout_height="wrap_content"
     66                     android:requiresFadingEdge="horizontal"
     67                     android:singleLine="true"
     68                     android:text="@string/long_text"
     69                     android:gravity="left"
     70                     />
     71 
     72             <android.widget.cts.MockTextView
     73                     android:id="@+id/mock_textview_right"
     74                     android:layout_width="wrap_content"
     75                     android:layout_height="wrap_content"
     76                     android:requiresFadingEdge="horizontal"
     77                     android:singleLine="true"
     78                     android:text="@string/long_text"
     79                     android:gravity="right"
     80                     />
     81 
     82             <android.widget.cts.MockTextView
     83                     android:id="@+id/mock_textview_center"
     84                     android:layout_width="wrap_content"
     85                     android:layout_height="wrap_content"
     86                     android:requiresFadingEdge="horizontal"
     87                     android:singleLine="true"
     88                     android:text="@string/long_text"
     89                     android:gravity="center"
     90                     />
     91         </LinearLayout>
     92 
     93     </ScrollView>
     94 
     95     <TextView android:id="@+id/textview_ltr"
     96               android:layout_height="wrap_content"
     97               android:layout_width="wrap_content"/>
     98 
     99     <TextView android:id="@+id/textview_rtl"
    100               android:layout_height="wrap_content"
    101               android:layout_width="wrap_content"/>
    102 
    103     <TextView android:id="@+id/textview_drawable_1_1"
    104               android:layout_height="wrap_content"
    105               android:layout_width="wrap_content"
    106               android:drawableLeft="@drawable/icon_blue"
    107               android:drawableRight="@drawable/icon_red"
    108               android:drawableTop="@drawable/icon_green"
    109               android:drawableBottom="@drawable/icon_yellow"
    110             />
    111 
    112     <TextView android:id="@+id/textview_drawable_1_2"
    113               android:layout_height="wrap_content"
    114               android:layout_width="wrap_content"
    115               android:drawableLeft="@drawable/icon_blue"
    116               android:drawableRight="@drawable/icon_red"
    117               android:drawableTop="@drawable/icon_green"
    118               android:drawableBottom="@drawable/icon_yellow"
    119               android:layoutDirection="rtl"
    120             />
    121 
    122     <TextView android:id="@+id/textview_drawable_2_1"
    123               android:layout_height="wrap_content"
    124               android:layout_width="wrap_content"
    125               android:drawableStart="@drawable/icon_blue"
    126               android:drawableEnd="@drawable/icon_red"
    127               android:drawableTop="@drawable/icon_green"
    128               android:drawableBottom="@drawable/icon_yellow"
    129             />
    130 
    131     <TextView android:id="@+id/textview_drawable_2_2"
    132               android:layout_height="wrap_content"
    133               android:layout_width="wrap_content"
    134               android:drawableStart="@drawable/icon_blue"
    135               android:drawableEnd="@drawable/icon_red"
    136               android:drawableTop="@drawable/icon_green"
    137               android:drawableBottom="@drawable/icon_yellow"
    138               android:layoutDirection="rtl"
    139             />
    140 
    141     <TextView android:id="@+id/textview_drawable_3_1"
    142               android:layout_height="wrap_content"
    143               android:layout_width="wrap_content"
    144               android:drawableLeft="@drawable/icon_black"
    145               android:drawableRight="@drawable/icon_black"
    146               android:drawableStart="@drawable/icon_blue"
    147               android:drawableEnd="@drawable/icon_red"
    148               android:drawableTop="@drawable/icon_green"
    149               android:drawableBottom="@drawable/icon_yellow"
    150             />
    151 
    152     <TextView android:id="@+id/textview_drawable_3_2"
    153               android:layout_height="wrap_content"
    154               android:layout_width="wrap_content"
    155               android:drawableLeft="@drawable/icon_black"
    156               android:drawableRight="@drawable/icon_black"
    157               android:drawableStart="@drawable/icon_blue"
    158               android:drawableEnd="@drawable/icon_red"
    159               android:drawableTop="@drawable/icon_green"
    160               android:drawableBottom="@drawable/icon_yellow"
    161               android:layoutDirection="rtl"
    162             />
    163 
    164 
    165     <LinearLayout android:orientation="vertical"
    166                   android:layout_width="match_parent"
    167                   android:layout_height="match_parent"
    168                   android:layoutDirection="ltr">
    169 
    170         <TextView android:id="@+id/textview_drawable_4_1"
    171                   android:layout_height="wrap_content"
    172                   android:layout_width="wrap_content"
    173                   android:drawableStart="@drawable/icon_blue"
    174                   android:drawableEnd="@drawable/icon_red"
    175                   android:drawableTop="@drawable/icon_green"
    176                   android:drawableBottom="@drawable/icon_yellow"
    177                 />
    178 
    179         <TextView android:id="@+id/textview_drawable_5_1"
    180                   android:layout_height="wrap_content"
    181                   android:layout_width="wrap_content"
    182                   android:drawableLeft="@drawable/icon_black"
    183                   android:drawableRight="@drawable/icon_black"
    184                   android:drawableStart="@drawable/icon_blue"
    185                   android:drawableEnd="@drawable/icon_red"
    186                   android:drawableTop="@drawable/icon_green"
    187                   android:drawableBottom="@drawable/icon_yellow"
    188                 />
    189 
    190     </LinearLayout>
    191 
    192     <LinearLayout android:orientation="vertical"
    193                   android:layout_width="match_parent"
    194                   android:layout_height="match_parent"
    195                   android:layoutDirection="rtl">
    196 
    197         <TextView android:id="@+id/textview_drawable_4_2"
    198                   android:layout_height="wrap_content"
    199                   android:layout_width="wrap_content"
    200                   android:drawableStart="@drawable/icon_blue"
    201                   android:drawableEnd="@drawable/icon_red"
    202                   android:drawableTop="@drawable/icon_green"
    203                   android:drawableBottom="@drawable/icon_yellow"
    204                 />
    205 
    206         <TextView android:id="@+id/textview_drawable_5_2"
    207                   android:layout_height="wrap_content"
    208                   android:layout_width="wrap_content"
    209                   android:drawableLeft="@drawable/icon_black"
    210                   android:drawableRight="@drawable/icon_black"
    211                   android:drawableStart="@drawable/icon_blue"
    212                   android:drawableEnd="@drawable/icon_red"
    213                   android:drawableTop="@drawable/icon_green"
    214                   android:drawableBottom="@drawable/icon_yellow"
    215                 />
    216 
    217     </LinearLayout>
    218 
    219 </LinearLayout>
    220