Home | History | Annotate | Download | only in layout
      1 <!--
      2      Copyright (C) 2013 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     17     android:layout_width="match_parent"
     18     android:layout_height="wrap_content"
     19     android:paddingBottom="6dp"
     20     android:paddingTop="6dp"
     21     android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     22     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     23     android:orientation="vertical"
     24     android:background="?android:attr/selectableItemBackground"
     25     >
     26 
     27     <RelativeLayout
     28         android:layout_width="match_parent"
     29         android:layout_height="@*android:dimen/status_bar_icon_size"
     30         android:layout_marginBottom="4dp"
     31         >
     32 
     33         <ImageView
     34             android:id="@android:id/icon"
     35             android:layout_width="@*android:dimen/status_bar_icon_size"
     36             android:layout_height="@*android:dimen/status_bar_icon_size"
     37             android:layout_centerVertical="true"
     38             android:layout_toEndOf="@+id/pkgicon"
     39             android:layout_marginStart="0dp"
     40             android:layout_marginEnd="8dp"
     41             android:contentDescription="@null"
     42             android:adjustViewBounds="true"
     43             android:maxHeight="@*android:dimen/status_bar_icon_size"
     44             android:maxWidth="@*android:dimen/status_bar_icon_size"
     45             android:scaleType="fitCenter" />
     46 
     47         <TextView
     48             android:id="@android:id/title"
     49             android:layout_width="match_parent"
     50             android:layout_height="wrap_content"
     51             android:layout_centerVertical="true"
     52             android:layout_toStartOf="@+id/timestamp"
     53             android:layout_toEndOf="@android:id/icon"
     54             android:ellipsize="end"
     55             android:singleLine="true"
     56             android:textColor="?android:attr/textColorPrimary"
     57             android:textAppearance="?android:attr/textAppearanceSmall"
     58             android:textStyle="bold"
     59             android:textAlignment="viewStart"
     60             android:labelFor="@android:id/button2" />
     61 
     62         <DateTimeView
     63             android:id="@+id/timestamp"
     64             android:layout_width="wrap_content"
     65             android:layout_height="wrap_content"
     66             android:layout_alignBottom="@android:id/widget_frame"
     67             android:layout_alignParentEnd="true"
     68             android:layout_alignTop="@android:id/widget_frame"
     69             android:layout_centerVertical="true"
     70             android:ellipsize="end"
     71             android:singleLine="true"
     72             android:textColor="?android:attr/textColorPrimary"
     73             android:textAppearance="?android:attr/textAppearanceSmall"
     74             android:textAlignment="viewEnd"
     75             />
     76     </RelativeLayout>
     77 
     78     <TextView
     79         android:id="@+id/extra"
     80         android:layout_width="match_parent"
     81         android:layout_height="wrap_content"
     82         android:orientation="horizontal"
     83         android:layout_marginStart="30dp"
     84         android:ellipsize="end"
     85         android:singleLine="true"
     86         android:textColor="?android:attr/textColorPrimary"
     87         android:textAppearance="?android:attr/textAppearanceSmall"
     88         android:textAlignment="viewStart"
     89         />
     90 
     91     <LinearLayout
     92         android:layout_width="match_parent"
     93         android:layout_height="@*android:dimen/status_bar_icon_size"
     94         android:orientation="horizontal"
     95         android:layout_marginStart="30dp"
     96         >
     97 
     98         <ImageView
     99             android:id="@+id/pkgicon"
    100             android:layout_width="@*android:dimen/status_bar_icon_size"
    101             android:layout_height="@*android:dimen/status_bar_icon_size"
    102             android:layout_marginStart="0dp"
    103             android:layout_marginEnd="6dp"
    104             android:contentDescription="@null"
    105             android:adjustViewBounds="true"
    106             android:maxHeight="@*android:dimen/status_bar_icon_size"
    107             android:maxWidth="@*android:dimen/status_bar_icon_size"
    108             android:scaleType="fitCenter" />
    109 
    110         <TextView
    111             android:id="@+id/pkgname"
    112             android:layout_width="match_parent"
    113             android:layout_height="wrap_content"
    114             android:layout_gravity="left|center_vertical"
    115             android:ellipsize="end"
    116             android:singleLine="true"
    117             android:textColor="?android:attr/textColorPrimary"
    118             android:textAppearance="?android:attr/textAppearanceSmall"
    119             android:textAlignment="viewStart"
    120             />
    121 
    122     </LinearLayout>
    123 </LinearLayout>