1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2018 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<RelativeLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/entity_header" 21 style="@style/EntityHeader" 22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 25 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 26 android:orientation="horizontal"> 27 28 <LinearLayout 29 android:id="@+id/entity_header_content" 30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:layout_centerHorizontal="true" 33 android:gravity="center_horizontal" 34 android:orientation="vertical"> 35 36 <ImageView 37 android:id="@+id/entity_header_icon" 38 android:layout_width="48dp" 39 android:layout_height="48dp" 40 android:scaleType="fitCenter" 41 android:antialias="true"/> 42 43 <TextView 44 android:id="@+id/entity_header_title" 45 style="@style/TextAppearance.EntityHeaderTitle" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:singleLine="false" 49 android:gravity="center" 50 android:ellipsize="marquee" 51 android:textDirection="locale" 52 android:layout_marginTop="8dp"/> 53 54 <TextView 55 android:id="@+id/install_type" 56 style="@style/TextAppearance.EntityHeaderSummary" 57 android:visibility="gone" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 android:layout_marginTop="2dp"/> 61 62 <TextView 63 android:id="@+id/entity_header_summary" 64 style="@style/TextAppearance.EntityHeaderSummary" 65 android:layout_width="wrap_content" 66 android:layout_height="wrap_content" 67 android:layout_marginTop="2dp" 68 android:singleLine="false" 69 android:textAlignment="center"/> 70 71 <TextView 72 android:id="@+id/entity_header_second_summary" 73 style="@style/TextAppearance.EntityHeaderSummary" 74 android:singleLine="false" 75 android:maxLines="4" 76 android:layout_width="wrap_content" 77 android:layout_height="wrap_content"/> 78 79 </LinearLayout> 80 81 <LinearLayout 82 android:layout_width="wrap_content" 83 android:layout_height="wrap_content" 84 android:layout_centerVertical="true" 85 android:layout_alignParentEnd="true" 86 android:orientation="vertical"> 87 88 <ImageButton 89 android:id="@android:id/button1" 90 style="?android:attr/actionOverflowButtonStyle" 91 android:layout_width="wrap_content" 92 android:layout_weight="1" 93 android:layout_height="0dp" 94 android:visibility="gone" 95 android:minWidth="24dp" 96 android:src="@null" 97 android:tint="?android:attr/colorAccent"/> 98 99 <ImageButton 100 android:id="@android:id/button2" 101 style="?android:attr/actionOverflowButtonStyle" 102 android:layout_width="wrap_content" 103 android:layout_weight="1" 104 android:layout_height="0dp" 105 android:visibility="gone" 106 android:minWidth="24dp" 107 android:src="@null" 108 android:tint="?android:attr/colorAccent"/> 109 110 </LinearLayout> 111 112</RelativeLayout> 113