1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 /* 4 * Copyright (C) 2012 The Android Open Source Project 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 --> 19 20 <LinearLayout 21 xmlns:android="http://schemas.android.com/apk/res/android" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 android:layout_marginTop="@dimen/widget_margin_top" 25 android:layout_marginLeft="@dimen/widget_margin_left" 26 android:layout_marginRight="@dimen/widget_margin_right" 27 android:layout_marginBottom="@dimen/widget_margin_bottom" 28 android:orientation="vertical"> 29 <LinearLayout 30 android:id="@+id/widget_header" 31 android:layout_width="match_parent" 32 android:layout_height="48dp" 33 android:orientation="horizontal" 34 android:paddingLeft="8dip" 35 android:paddingRight="8dip" 36 android:background="@drawable/header_bg_mms_widget_holo" 37 android:gravity="center_vertical"> 38 <ImageView 39 android:id="@+id/widget_icon" 40 android:layout_width="32dip" 41 android:layout_height="32dip" 42 android:layout_marginRight="8dip" 43 android:src="@mipmap/ic_launcher_smsmms" /> 44 <TextView 45 android:id="@+id/widget_label" 46 style="@style/WidgetTitle" 47 android:layout_height="wrap_content" 48 android:layout_width="0dip" 49 android:layout_weight = "1" 50 android:layout_marginRight="8dip" 51 android:freezesText="true" /> 52 <!-- Note: We can't set "freezesText" on the widget_unread_count view, as the launcher can 53 restore stale data over updated data. --> 54 <TextView 55 android:id="@+id/widget_unread_count" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content" 58 android:layout_marginRight="12dip" 59 android:textSize="18sp" 60 android:textColor="#777777" /> 61 <ImageButton 62 android:id="@+id/widget_compose" 63 android:layout_width="wrap_content" 64 android:layout_height="wrap_content" 65 android:src="@drawable/ic_menu_msg_compose_holo_dark" 66 android:background="?android:attr/selectableItemBackground" 67 android:contentDescription="@string/new_message" 68 android:paddingLeft="4dip" 69 android:paddingBottom="4dip" /> 70 </LinearLayout> 71 <ListView 72 android:id="@+id/conversation_list" 73 android:layout_width="match_parent" 74 android:layout_height="0dip" 75 android:layout_weight="1" 76 android:background="@drawable/gradient_bg_widget_holo" 77 android:cacheColorHint="#00000000" /> 78 <ImageView 79 android:layout_width="match_parent" 80 android:layout_height="wrap_content" 81 android:background="@drawable/list_div_top_btm_mms_widget_holo" /> 82 </LinearLayout> 83