Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2013 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 <!-- Demonstrates undo/redo behavior on a text field. -->
     18 
     19 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:layout_width="match_parent" android:layout_height="match_parent">
     21     <LinearLayout android:orientation="vertical" android:padding="4dip"
     22         android:layout_width="match_parent" android:layout_height="wrap_content">
     23 
     24         <TextView android:id="@+id/default_edit_msg"
     25             android:layout_width="match_parent" android:layout_height="wrap_content"
     26             android:layout_weight="0" android:textAppearance="?android:attr/textAppearanceMedium"
     27             android:paddingBottom="8dip"
     28             android:text="@string/text_undo_default_edit_msg" />
     29 
     30         <EditText android:id="@+id/default_text"
     31             android:layout_width="match_parent" android:layout_height="wrap_content"
     32             android:layout_weight="1"
     33             android:textAppearance="?android:attr/textAppearanceMedium"
     34             android:freezesText="true">
     35         </EditText>
     36 
     37         <LinearLayout
     38             android:orientation="horizontal"
     39             android:layout_width="wrap_content"
     40             android:layout_height="match_parent"
     41             android:paddingTop="8dip">
     42             <Button
     43                 android:id="@+id/set_text"
     44                 android:layout_width="wrap_content"
     45                 android:layout_height="wrap_content"
     46                 android:text="@string/text_undo_set_text"
     47                 android:layout_gravity="bottom" />                
     48             <Button
     49                 android:id="@+id/append_text"
     50                 android:layout_width="wrap_content"
     51                 android:layout_height="wrap_content"
     52                 android:text="@string/text_undo_append_text"
     53                 android:layout_gravity="bottom" />
     54             <Button
     55                 android:id="@+id/insert_text"
     56                 android:layout_width="wrap_content"
     57                 android:layout_height="wrap_content"
     58                 android:text="@string/text_undo_insert_text"
     59                 android:layout_gravity="bottom" />
     60         </LinearLayout>
     61 
     62         <TextView android:id="@+id/undo_disabled_msg"
     63             android:layout_width="match_parent"
     64             android:layout_height="wrap_content"
     65             android:layout_weight="0"
     66             android:textAppearance="?android:attr/textAppearanceMedium"
     67             android:paddingBottom="8dip"
     68             android:text="@string/text_undo_undo_disabled_msg" />
     69 
     70         <EditText android:id="@+id/undo_disabled_text"
     71             android:layout_width="match_parent"
     72             android:layout_height="wrap_content"
     73             android:layout_weight="1"
     74             android:textAppearance="?android:attr/textAppearanceMedium"
     75             android:freezesText="true"
     76             android:allowUndo="false">
     77         </EditText>
     78 
     79         <TextView android:id="@+id/length_limit_msg"
     80             android:layout_width="match_parent"
     81             android:layout_height="wrap_content"
     82             android:layout_weight="0"
     83             android:textAppearance="?android:attr/textAppearanceMedium"
     84             android:paddingBottom="8dip"
     85             android:text="@string/text_undo_length_limit_msg" />
     86 
     87         <EditText android:id="@+id/length_limit_text"
     88             android:layout_width="match_parent"
     89             android:layout_height="wrap_content"
     90             android:layout_weight="1"
     91             android:textAppearance="?android:attr/textAppearanceMedium"
     92             android:freezesText="true">
     93         </EditText>
     94 
     95         <TextView android:id="@+id/credit_card_msg"
     96             android:layout_width="match_parent"
     97             android:layout_height="wrap_content"
     98             android:layout_weight="0"
     99             android:textAppearance="?android:attr/textAppearanceMedium"
    100             android:paddingBottom="8dip"
    101             android:text="@string/text_undo_credit_card_msg" />
    102 
    103         <EditText android:id="@+id/credit_card_text"
    104             android:layout_width="match_parent"
    105             android:layout_height="wrap_content"
    106             android:layout_weight="1"
    107             android:textAppearance="?android:attr/textAppearanceMedium"
    108             android:freezesText="true">
    109         </EditText>
    110 
    111     </LinearLayout>
    112 </ScrollView>
    113