Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   Copyright (C) 2016 The Android Open Source Project
      4 
      5   Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
      6   except in compliance with the License. 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 distributed under the
     11   License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     12   KIND, either express or implied. See the License for the specific language governing
     13   permissions and limitations under the License.
     14   -->
     15 <LinearLayout
     16     xmlns:android="http://schemas.android.com/apk/res/android"
     17     android:orientation="vertical"
     18     android:layout_width="match_parent"
     19     android:layout_height="wrap_content"
     20     android:minHeight="?android:attr/listPreferredItemHeightSmall"
     21     android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     22     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     23     android:paddingTop="8dp"
     24     android:paddingBottom="8dp"
     25     android:background="?android:attr/selectableItemBackgroundBorderless"
     26     android:gravity="center_horizontal"
     27     android:clipToPadding="false">
     28 
     29     <FrameLayout
     30         android:layout_width="96dp"
     31         android:layout_height="wrap_content">
     32 
     33         <ImageView
     34             android:id="@android:id/icon"
     35             android:layout_width="wrap_content"
     36             android:layout_height="wrap_content"
     37             android:padding="10dp"
     38             android:layout_gravity="center"
     39             android:scaleType="fitCenter" />
     40 
     41         <LinearLayout
     42             android:id="@+id/contextGroup"
     43             android:layout_width="match_parent"
     44             android:layout_height="wrap_content"
     45             android:visibility="invisible"
     46             android:layout_gravity="bottom">
     47 
     48             <ImageView
     49                 android:id="@android:id/shareText"
     50                 android:layout_width="40dp"
     51                 android:layout_height="40dp"
     52                 android:padding="8dp"
     53                 android:src="@drawable/ic_share"
     54                 android:scaleType="fitCenter"
     55                 android:background="#40000000"/>
     56 
     57             <Space
     58                 android:layout_width="0dp"
     59                 android:layout_height="0dp"
     60                 android:layout_weight="1" />
     61 
     62             <ImageView
     63                 android:id="@android:id/closeButton"
     64                 android:layout_width="40dp"
     65                 android:layout_height="40dp"
     66                 android:padding="4dp"
     67                 android:src="@drawable/ic_close"
     68                 android:scaleType="fitCenter"
     69                 android:background="#40000000"/>
     70 
     71         </LinearLayout>
     72 
     73     </FrameLayout>
     74 
     75     <TextView
     76         android:id="@android:id/title"
     77         android:layout_width="wrap_content"
     78         android:layout_height="wrap_content"
     79         android:textAppearance="?android:attr/textAppearanceListItem"
     80         android:gravity="center"/>
     81 </LinearLayout>
     82 
     83