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="6dp"
     31         >
     32 
     33         <ImageView
     34             android:id="@+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:tint="?android:attr/textColorPrimary"
     44             android:maxHeight="@*android:dimen/status_bar_icon_size"
     45             android:maxWidth="@*android:dimen/status_bar_icon_size"
     46             android:scaleType="fitCenter" />
     47 
     48         <TextView
     49             android:id="@+id/title"
     50             android:layout_width="match_parent"
     51             android:layout_height="wrap_content"
     52             android:layout_centerVertical="true"
     53             android:layout_toStartOf="@+id/timestamp"
     54             android:layout_toEndOf="@id/icon"
     55             android:ellipsize="end"
     56             android:singleLine="true"
     57             android:textColor="?android:attr/textColorPrimary"
     58             android:textAppearance="?android:attr/textAppearanceSmall"
     59             android:textStyle="bold"
     60             android:textAlignment="viewStart"
     61             android:labelFor="@android:id/button2" />
     62 
     63         <DateTimeView
     64             android:id="@+id/timestamp"
     65             android:layout_width="wrap_content"
     66             android:layout_height="wrap_content"
     67             android:layout_alignBottom="@android:id/widget_frame"
     68             android:layout_alignParentEnd="true"
     69             android:layout_alignTop="@android:id/widget_frame"
     70             android:layout_centerVertical="true"
     71             android:ellipsize="end"
     72             android:singleLine="true"
     73             android:textColor="?android:attr/textColorPrimary"
     74             android:textAppearance="?android:attr/textAppearanceSmall"
     75             android:textAlignment="viewEnd"
     76             />
     77     </RelativeLayout>
     78 
     79     <LinearLayout
     80         android:layout_width="match_parent"
     81         android:layout_height="@*android:dimen/status_bar_icon_size"
     82         android:orientation="horizontal"
     83         android:layout_marginStart="30dp"
     84         android:layout_marginBottom="6dp"
     85         >
     86 
     87         <ImageView
     88             android:id="@+id/pkgicon"
     89             android:layout_width="@*android:dimen/status_bar_icon_size"
     90             android:layout_height="@*android:dimen/status_bar_icon_size"
     91             android:layout_marginStart="0dp"
     92             android:layout_marginEnd="6dp"
     93             android:contentDescription="@null"
     94             android:adjustViewBounds="true"
     95             android:maxHeight="@*android:dimen/status_bar_icon_size"
     96             android:maxWidth="@*android:dimen/status_bar_icon_size"
     97             android:scaleType="fitCenter" />
     98 
     99         <TextView
    100             android:id="@+id/pkgname"
    101             android:layout_width="match_parent"
    102             android:layout_height="wrap_content"
    103             android:layout_gravity="left|center_vertical"
    104             android:ellipsize="end"
    105             android:singleLine="true"
    106             android:textColor="?android:attr/textColorPrimary"
    107             android:textAppearance="?android:attr/textAppearanceSmall"
    108             android:textAlignment="viewStart"
    109             />
    110 
    111     </LinearLayout>
    112 
    113     <TextView
    114             android:id="@+id/extra"
    115             android:layout_width="match_parent"
    116             android:layout_height="wrap_content"
    117             android:orientation="horizontal"
    118             android:layout_marginStart="30dp"
    119             android:layout_marginBottom="6dp"
    120             android:singleLine="false"
    121             android:textColor="?android:attr/textColorPrimary"
    122             android:textSize="10sp"
    123             android:fontFamily="monospace"
    124             android:textAlignment="viewStart"
    125     />
    126 
    127 </LinearLayout>
    128