Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2015 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 <!--
     18   Defines the layout of the splash screen that displays the security
     19   settings required for an application and requests the confirmation of the
     20   user before it is installed.
     21 -->
     22 
     23 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     24         android:layout_width="match_parent"
     25         android:layout_height="match_parent"
     26         android:orientation="vertical">
     27 
     28     <!-- title bar -->
     29     <LinearLayout android:id="@+id/app_snippet"
     30             android:background="?android:attr/colorPrimary"
     31             android:layout_width="match_parent"
     32             android:layout_height="?android:attr/actionBarSize"
     33             android:orientation="horizontal">
     34 
     35         <ImageView android:id="@+id/app_icon"
     36                 android:layout_marginLeft="16dp"
     37                 android:layout_width="24dp"
     38                 android:layout_height="24dp"
     39                 android:layout_gravity="center_vertical"
     40                 android:scaleType="fitCenter" />
     41 
     42         <TextView android:id="@+id/app_name"
     43                 android:layout_gravity="center_vertical"
     44                 android:layout_marginLeft="32dp"
     45                 android:layout_marginRight="16dp"
     46                 android:layout_width="wrap_content"
     47                 android:layout_height="wrap_content"
     48                 android:textAppearance="?android:attr/titleTextStyle"
     49                 android:singleLine="true"
     50                 android:ellipsize="end" />
     51 
     52     </LinearLayout>
     53 
     54     <!-- content -->
     55     <LinearLayout android:id="@+id/install_confirm_panel"
     56             android:layout_width="match_parent"
     57             android:layout_height="match_parent"
     58             android:orientation="vertical">
     59 
     60         <TextView android:id="@+id/install_confirm_question"
     61                 android:layout_width="match_parent"
     62                 android:layout_height="wrap_content"
     63                 android:background="?android:attr/colorPrimary"
     64                 android:textAppearance="?android:attr/textAppearanceMedium"
     65                 android:text="@string/install_confirm_question"
     66                 android:paddingLeft="16dp"
     67                 android:paddingRight="16dp" />
     68 
     69         <View android:id="@+id/spacer"
     70                 android:layout_width="match_parent"
     71                 android:layout_height="16dp"
     72                 android:visibility="gone"
     73                 android:background="?android:attr/colorPrimary" />
     74 
     75         <TabHost android:id="@android:id/tabhost"
     76                 android:layout_width="match_parent"
     77                 android:layout_height="wrap_content"
     78                 android:layout_weight="1">
     79 
     80             <LinearLayout android:orientation="vertical"
     81                     android:layout_width="match_parent"
     82                     android:layout_height="match_parent">
     83 
     84                 <HorizontalScrollView android:id="@+id/tabscontainer"
     85                         android:background="?android:attr/colorPrimary"
     86                         android:layout_width="match_parent"
     87                         android:layout_height="wrap_content"
     88                         android:fillViewport="true"
     89                         android:scrollbars="none">
     90 
     91                     <FrameLayout android:layout_width="match_parent"
     92                             android:layout_height="wrap_content">
     93 
     94                         <TabWidget android:id="@android:id/tabs"
     95                                 android:orientation="horizontal"
     96                                 android:layout_width="wrap_content"
     97                                 android:layout_height="wrap_content"
     98                                 android:layout_gravity="center" />
     99 
    100                     </FrameLayout>
    101 
    102                 </HorizontalScrollView>
    103 
    104                 <!-- divider underneath tabs -->
    105                 <View android:layout_width="match_parent"
    106                         android:layout_height="1dp"
    107                         android:layout_marginTop="-1dp"
    108                         android:background="#1F000000" />
    109 
    110                 <FrameLayout android:id="@android:id/tabcontent"
    111                         android:layout_width="0dp"
    112                         android:layout_height="0dp"
    113                         android:layout_weight="0" />
    114 
    115                 <android.support.v4.view.ViewPager android:id="@+id/pager"
    116                         android:background="?android:attr/windowBackground"
    117                         android:layout_width="match_parent"
    118                         android:layout_height="0dp"
    119                         android:layout_weight="1" />
    120 
    121             </LinearLayout>
    122 
    123         </TabHost>
    124 
    125         <!-- Bottom buttons -->
    126         <LinearLayout style="?android:attr/buttonBarStyle"
    127                 android:background="?android:attr/windowBackground"
    128                 android:layout_width="match_parent"
    129                 android:layout_height="wrap_content"
    130                 android:orientation="horizontal"
    131                 android:padding="8dp"
    132                 android:measureWithLargestChild="true">
    133 
    134             <!-- spacer to push buttons to the right -->
    135             <View android:layout_width="0dp"
    136                     android:layout_height="0dp"
    137                     android:layout_weight="1" />
    138 
    139             <Button android:id="@+id/cancel_button"
    140                     android:layout_width="wrap_content"
    141                     android:layout_height="wrap_content"
    142                     android:text="@string/cancel"
    143                     android:maxLines="2"
    144                     style="?android:attr/buttonBarButtonStyle" />
    145 
    146             <Button android:id="@+id/ok_button"
    147                     android:layout_width="wrap_content"
    148                     android:layout_height="wrap_content"
    149                     android:text="@string/next"
    150                     android:maxLines="2"
    151                     android:filterTouchesWhenObscured="true"
    152                     style="?android:attr/buttonBarButtonStyle" />
    153 
    154         </LinearLayout>
    155 
    156     </LinearLayout>
    157 
    158 </LinearLayout>
    159 
    160 
    161