Home | History | Annotate | Download | only in layout-land
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3     Copyright (C) 2015 The Android Open Source Project
      4 
      5     Licensed under the Apache License, Version 2.0 (the "License")
      6     you may not use this file except in compliance with the License.
      7     You may obtain a copy of the License at
      8 
      9         http://www.apache.org/licenses/LICENSE-2.0
     10 
     11     Unless required by applicable law or agreed to in writing, software
     12     distributed under the License is distributed on an "AS IS" BASIS,
     13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14     See the License for the specific language governing permissions and
     15     limitations under the License.
     16 -->
     17 
     18 <com.android.setupwizardlib.GlifLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     xmlns:settings="http://schemas.android.com/apk/res-auto"
     21     android:layout_width="match_parent"
     22     android:layout_height="match_parent"
     23     android:icon="@drawable/ic_lock"
     24     android:layout="@layout/suw_glif_blank_template"
     25     settings:suwHeaderText="@string/lock_settings_picker_title">
     26 
     27     <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
     28         android:id="@+id/topLayout"
     29         android:clipChildren="false"
     30         android:clipToPadding="false"
     31         android:orientation="horizontal"
     32         android:layout_width="match_parent"
     33         android:layout_height="match_parent">
     34 
     35         <!-- left side: instructions and messages -->
     36         <LinearLayout
     37             android:layout_width="0dip"
     38             android:layout_height="match_parent"
     39             android:layout_weight="1.0"
     40             android:layout_marginStart="?attr/suwMarginSides"
     41             android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom"
     42             android:clipChildren="false"
     43             android:clipToPadding="false"
     44             android:orientation="vertical">
     45 
     46             <ImageView
     47                 android:id="@+id/suw_layout_icon"
     48                 style="@style/SuwGlifIcon"
     49                 android:layout_width="wrap_content"
     50                 android:layout_height="wrap_content"
     51                 android:layout_marginStart="0dp"
     52                 android:layout_marginEnd="0dp"
     53                 android:src="@drawable/ic_lock"/>
     54 
     55             <ScrollView
     56                 android:id="@+id/scroll_layout_title_header"
     57                 android:layout_width="match_parent"
     58                 android:layout_height="0dp"
     59                 android:layout_weight="3.0">
     60 
     61                 <LinearLayout
     62                     android:layout_width="match_parent"
     63                     android:layout_height="wrap_content"
     64                     android:orientation="vertical">
     65 
     66                     <TextView
     67                         android:id="@+id/suw_layout_title"
     68                         style="@style/SuwGlifHeaderTitle"
     69                         android:layout_width="match_parent"
     70                         android:layout_height="wrap_content"
     71                         android:layout_marginStart="0dp"
     72                         android:layout_marginEnd="0dp"/>
     73 
     74                     <!-- header message -->
     75                     <TextView
     76                         android:id="@+id/headerText"
     77                         android:layout_width="match_parent"
     78                         android:layout_height="wrap_content"
     79                         android:layout_marginTop="16dp"
     80                         android:gravity="start|bottom"
     81                         android:textSize="18sp"/>
     82 
     83                 </LinearLayout>
     84 
     85             </ScrollView>
     86 
     87             <!-- footer can show a message, or confirm / restart buttons -->
     88             <RelativeLayout
     89                 android:layout_width="match_parent"
     90                 android:layout_height="0dip"
     91                 android:layout_weight="1.0"
     92                 android:clipChildren="false"
     93                 android:clipToPadding="false">
     94 
     95                 <!-- confirm / restart buttons -->
     96                 <LinearLayout android:id="@+id/buttonContainer"
     97                     android:layout_width="match_parent"
     98                     android:layout_height="wrap_content"
     99                     android:layout_centerHorizontal="true"
    100                     android:layout_alignParentBottom="true"
    101                     android:clipChildren="false"
    102                     android:clipToPadding="false"
    103                     android:orientation="horizontal">
    104 
    105                     <!-- left / top button: skip, or re-try -->
    106                     <Button android:id="@+id/footerLeftButton"
    107                         style="@style/SetupWizardButton.Negative"
    108                         android:layout_width="wrap_content"
    109                         android:layout_height="wrap_content"
    110                         android:text="@string/lockpattern_restart_button_text" />
    111 
    112                     <Space
    113                         android:layout_width="0dp"
    114                         android:layout_height="0dp"
    115                         android:layout_weight="1" />
    116 
    117                     <!-- right / bottom button: confirm or ok -->
    118                     <Button android:id="@+id/footerRightButton"
    119                         style="@style/SetupWizardButton.Positive"
    120                         android:layout_width="wrap_content"
    121                         android:layout_height="wrap_content"
    122                         android:text="@string/lockpattern_confirm_button_text" />
    123 
    124                 </LinearLayout>
    125 
    126                 <!-- message above buttons -->
    127                 <TextView android:id="@+id/footerText"
    128                     android:layout_width="wrap_content"
    129                     android:layout_height="wrap_content"
    130                     android:layout_above="@+id/buttonContainer"
    131                     android:layout_centerHorizontal="true"
    132                     android:layout_marginBottom="4dip"
    133                     android:textSize="14sp"
    134                     android:visibility="gone" />
    135 
    136             </RelativeLayout>
    137 
    138         </LinearLayout>
    139 
    140         <!-- right side: lock pattern -->
    141         <com.android.setupwizardlib.view.FillContentLayout
    142             style="@style/LockPatternContainerStyle"
    143             android:layout_width="0dp"
    144             android:layout_height="match_parent"
    145             android:layout_weight="1.0"
    146             android:paddingStart="0dp">
    147 
    148             <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
    149                 android:layout_width="match_parent"
    150                 android:layout_height="match_parent"
    151                 android:layout_gravity="center"
    152                 android:background="@color/lock_pattern_background" />
    153 
    154         </com.android.setupwizardlib.view.FillContentLayout>
    155 
    156     </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
    157 
    158 </com.android.setupwizardlib.GlifLayout>
    159