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:elevation="@dimen/headerElevation" 35 android:gravity="center_vertical"> 36 37 <ImageView android:id="@+id/app_icon" 38 android:layout_marginStart="16dp" 39 android:layout_width="24dp" 40 android:layout_height="24dp" 41 android:scaleType="fitCenter" /> 42 43 <TextView android:id="@+id/app_name" 44 android:layout_marginStart="32dp" 45 android:layout_marginEnd="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 <TextView android:id="@+id/install_confirm_question" 55 android:layout_width="match_parent" 56 android:layout_height="wrap_content" 57 android:background="?android:attr/colorPrimary" 58 android:textAppearance="?android:attr/textAppearanceMedium" 59 android:text="@string/install_confirm_question" 60 android:elevation="@dimen/headerElevation" 61 android:paddingStart="16dp" 62 android:paddingEnd="16dp" 63 android:paddingBottom="16dp"/> 64 65 <!-- content --> 66 <TabHost android:id="@android:id/tabhost" 67 android:layout_width="match_parent" 68 android:layout_height="wrap_content" 69 android:layout_weight="1"> 70 71 <LinearLayout android:orientation="vertical" 72 android:layout_width="match_parent" 73 android:layout_height="match_parent"> 74 75 <TabWidget android:id="@android:id/tabs" 76 android:visibility="gone" 77 android:layout_width="wrap_content" 78 android:layout_height="wrap_content" /> 79 80 <FrameLayout android:id="@android:id/tabcontent" 81 android:layout_width="0dp" 82 android:layout_height="0dp" 83 android:layout_weight="0" /> 84 85 <android.support.v4.view.ViewPager android:id="@+id/pager" 86 android:background="?android:attr/windowBackground" 87 android:layout_width="match_parent" 88 android:layout_height="0dp" 89 android:layout_weight="1" /> 90 91 </LinearLayout> 92 93 </TabHost> 94 95 <!-- Bottom buttons --> 96 <LinearLayout style="?android:attr/buttonBarStyle" 97 android:background="?android:attr/colorBackground" 98 android:layout_width="match_parent" 99 android:layout_height="wrap_content" 100 android:orientation="horizontal" 101 android:padding="8dp" 102 android:measureWithLargestChild="true"> 103 104 <!-- spacer to push buttons to the right --> 105 <View android:layout_width="0dp" 106 android:layout_height="0dp" 107 android:layout_weight="1" /> 108 109 <Button android:id="@+id/cancel_button" 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 android:text="@string/cancel" 113 android:maxLines="2" 114 style="?android:attr/buttonBarButtonStyle" /> 115 116 <Button android:id="@+id/ok_button" 117 android:layout_width="wrap_content" 118 android:layout_height="wrap_content" 119 android:text="@string/next" 120 android:maxLines="2" 121 style="?android:attr/buttonBarButtonStyle" /> 122 123 </LinearLayout> 124 125 </LinearLayout> 126 127 128