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         android:gravity="center_vertical">
     35 
     36         <ImageView android:id="@+id/app_icon"
     37             android:layout_marginStart="16dp"
     38             android:layout_width="24dp"
     39             android:layout_height="24dp"
     40             android:scaleType="fitCenter" />
     41 
     42         <TextView android:id="@+id/app_name"
     43             android:layout_marginStart="32dp"
     44             android:layout_marginEnd="16dp"
     45             android:layout_width="wrap_content"
     46             android:layout_height="wrap_content"
     47             android:textAppearance="?android:attr/titleTextStyle"
     48             android:singleLine="true"
     49             android:ellipsize="end" />
     50 
     51     </LinearLayout>
     52 
     53     <TextView android:id="@+id/install_confirm_question"
     54         android:layout_width="match_parent"
     55         android:layout_height="wrap_content"
     56         android:background="?android:attr/colorPrimary"
     57         android:textAppearance="?android:attr/textAppearanceMedium"
     58         android:text="@string/install_confirm_question"
     59         android:paddingStart="16dp"
     60         android:paddingEnd="16dp" />
     61 
     62     <!-- content -->
     63     <LinearLayout android:id="@+id/install_confirm_panel"
     64         android:layout_width="match_parent"
     65         android:layout_height="match_parent"
     66         android:orientation="vertical">
     67 
     68         <TabHost android:id="@android:id/tabhost"
     69             android:layout_width="match_parent"
     70             android:layout_height="wrap_content"
     71             android:layout_weight="1">
     72 
     73             <LinearLayout android:orientation="vertical"
     74                 android:layout_width="match_parent"
     75                 android:layout_height="match_parent">
     76 
     77                 <HorizontalScrollView android:id="@+id/tabscontainer"
     78                     android:background="?android:attr/colorPrimary"
     79                     android:layout_width="match_parent"
     80                     android:layout_height="wrap_content"
     81                     android:fillViewport="true"
     82                     android:elevation="@dimen/headerElevation"
     83                     android:scrollbars="none">
     84 
     85                     <FrameLayout android:layout_width="match_parent"
     86                         android:layout_height="wrap_content">
     87 
     88                         <TabWidget android:id="@android:id/tabs"
     89                             android:orientation="horizontal"
     90                             android:layout_width="wrap_content"
     91                             android:layout_height="wrap_content"
     92                             android:layout_gravity="center" />
     93 
     94                     </FrameLayout>
     95 
     96                 </HorizontalScrollView>
     97 
     98                 <!-- divider underneath tabs -->
     99                 <View android:layout_width="match_parent"
    100                     android:layout_height="1dp"
    101                     android:layout_marginTop="-1dp"
    102                     android:background="#1F000000" />
    103 
    104                 <FrameLayout android:id="@android:id/tabcontent"
    105                     android:layout_width="0dp"
    106                     android:layout_height="0dp"
    107                     android:layout_weight="0" />
    108 
    109                 <android.support.v4.view.ViewPager android:id="@+id/pager"
    110                     android:background="?android:attr/windowBackground"
    111                     android:layout_width="match_parent"
    112                     android:layout_height="0dp"
    113                     android:layout_weight="1" />
    114 
    115             </LinearLayout>
    116 
    117         </TabHost>
    118 
    119         <!-- Bottom buttons -->
    120         <LinearLayout style="?android:attr/buttonBarStyle"
    121             android:background="?android:attr/colorBackground"
    122             android:layout_width="match_parent"
    123             android:layout_height="wrap_content"
    124             android:orientation="horizontal"
    125             android:padding="8dp"
    126             android:measureWithLargestChild="true">
    127 
    128             <!-- spacer to push buttons to the right -->
    129             <View android:layout_width="0dp"
    130                 android:layout_height="0dp"
    131                 android:layout_weight="1" />
    132 
    133             <Button android:id="@+id/cancel_button"
    134                 android:layout_width="wrap_content"
    135                 android:layout_height="wrap_content"
    136                 android:text="@string/cancel"
    137                 android:maxLines="2"
    138                 style="?android:attr/buttonBarButtonStyle" />
    139 
    140             <Button android:id="@+id/ok_button"
    141                 android:layout_width="wrap_content"
    142                 android:layout_height="wrap_content"
    143                 android:text="@string/next"
    144                 android:maxLines="2"
    145                 style="?android:attr/buttonBarButtonStyle" />
    146 
    147         </LinearLayout>
    148 
    149     </LinearLayout>
    150 
    151 </LinearLayout>
    152 
    153 
    154