Home | History | Annotate | Download | only in layout
      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 <ScrollView
     18         xmlns:android="http://schemas.android.com/apk/res/android"
     19         android:layout_width="match_parent"
     20         android:layout_height="match_parent">
     21 
     22     <LinearLayout
     23             android:layout_width="match_parent"
     24             android:layout_height="wrap_content"
     25             android:orientation="vertical">
     26 
     27         <ImageView
     28                 android:layout_width="150dp"
     29                 android:layout_height="150dp"
     30                 android:layout_marginTop="32dp"
     31                 android:layout_marginBottom="32dp"
     32                 android:layout_gravity="center_horizontal"
     33                 android:scaleType="fitCenter"
     34                 android:src="@drawable/android_robot"/>
     35 
     36         <LinearLayout
     37                 android:layout_width="match_parent"
     38                 android:layout_height="wrap_content"
     39                 android:layout_marginTop="8dp"
     40                 android:layout_marginStart="8dp"
     41                 android:layout_marginEnd="8dp"
     42                 android:orientation="vertical"
     43                 android:background="@drawable/card"
     44                 android:elevation="4dp"
     45                 android:paddingTop="16dp"
     46                 android:paddingBottom="16dp"
     47                 android:paddingStart="16dp"
     48                 android:paddingEnd="16dp">
     49 
     50             <TextView
     51                     android:layout_width="wrap_content"
     52                     android:layout_height="wrap_content"
     53                     android:textAppearance="@android:style/TextAppearance.Material.Headline"
     54                     android:text="@string/item_title"/>
     55 
     56             <TextView
     57                     android:layout_width="wrap_content"
     58                     android:layout_height="wrap_content"
     59                     android:textAppearance="@android:style/TextAppearance.Material.Body2"
     60                     android:textColor="?android:attr/colorAccent"
     61                     android:text="@string/item_price"/>
     62 
     63             <TextView
     64                     android:layout_width="wrap_content"
     65                     android:layout_height="wrap_content"
     66                     android:layout_marginTop="16dp"
     67                     android:textAppearance="@android:style/TextAppearance.Material.Body1"
     68                     android:textColor="?android:attr/textColorSecondary"
     69                     android:text="@string/item_description"/>
     70 
     71         </LinearLayout>
     72         <Button style="@android:style/Widget.Material.Button.Colored"
     73                 android:layout_width="wrap_content"
     74                 android:layout_height="wrap_content"
     75                 android:layout_marginTop="8dp"
     76                 android:layout_marginEnd="4dp"
     77                 android:layout_gravity="end"
     78                 android:textColor="?android:attr/textColorPrimaryInverse"
     79                 android:text="@string/purchase"
     80                 android:id="@+id/purchase_button" />
     81 
     82         <Button style="@android:style/Widget.Material.Button.Colored"
     83             android:layout_width="wrap_content"
     84             android:layout_height="wrap_content"
     85             android:layout_marginTop="8dp"
     86             android:layout_marginEnd="4dp"
     87             android:layout_gravity="end"
     88             android:textColor="?android:attr/textColorPrimaryInverse"
     89             android:text="@string/purchase_not_invalidated"
     90             android:id="@+id/purchase_button_not_invalidated" />
     91 
     92         <TextView
     93             android:id="@+id/purchase_button_not_invalidated_description"
     94             android:layout_width="match_parent"
     95             android:layout_height="wrap_content"
     96             android:layout_marginEnd="4dp"
     97             android:gravity="end"
     98             android:textAlignment="gravity"
     99             android:text="@string/purchase_button_not_invalidated_description"
    100             />
    101 
    102         <TextView
    103                 android:id="@+id/confirmation_message"
    104                 android:layout_width="wrap_content"
    105                 android:layout_height="wrap_content"
    106                 android:layout_marginTop="16dp"
    107                 android:paddingStart="16dp"
    108                 android:paddingEnd="16dp"
    109                 android:textAppearance="@android:style/TextAppearance.Material.Body2"
    110                 android:textColor="?android:attr/colorAccent"
    111                 android:text="@string/purchase_done"
    112                 android:visibility="gone"/>
    113 
    114         <TextView
    115                 android:id="@+id/encrypted_message"
    116                 android:layout_width="wrap_content"
    117                 android:layout_height="wrap_content"
    118                 android:layout_marginTop="16dp"
    119                 android:paddingStart="16dp"
    120                 android:paddingEnd="16dp"
    121                 android:textAppearance="@android:style/TextAppearance.Material.Body2"
    122                 android:textColor="?android:attr/colorAccent"
    123                 android:text="@string/purchase_done"
    124                 android:visibility="gone"/>
    125     </LinearLayout>
    126 </ScrollView>