Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2012 Google Inc.
      4      Licensed to 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 <LinearLayout
     20     xmlns:android="http://schemas.android.com/apk/res/android"
     21     android:layout_width="match_parent"
     22     android:layout_height="match_parent"
     23     android:layout_marginTop="@dimen/widget_margin_top"
     24     android:layout_marginLeft="@dimen/widget_margin_left"
     25     android:layout_marginRight="@dimen/widget_margin_right"
     26     android:layout_marginBottom="@dimen/widget_margin_bottom"
     27     android:orientation="vertical">
     28     <LinearLayout
     29         android:id="@+id/widget_header"
     30         android:layout_width="match_parent"
     31         android:layout_height="48dp"
     32         android:orientation="horizontal"
     33         android:paddingLeft="8dip"
     34         android:paddingRight="8dip"
     35         android:background="@drawable/header_bg_widget_holo"
     36         android:gravity="center_vertical">
     37         <ImageView
     38             android:id="@+id/widget_icon"
     39             android:layout_width="32dip"
     40             android:layout_height="32dip"
     41             android:layout_marginRight="8dip"
     42             android:src="@mipmap/ic_launcher_mail" />
     43         <LinearLayout
     44             android:layout_width="0dip"
     45             android:layout_height="wrap_content"
     46             android:layout_weight = "1"
     47             android:layout_marginRight="8dip"
     48             android:orientation="vertical">
     49             <TextView
     50                 android:id="@+id/widget_folder"
     51                 style="@style/WidgetTitle"
     52                 android:layout_width="wrap_content"
     53                 android:layout_height="wrap_content"
     54                 android:freezesText="true"
     55                 android:includeFontPadding="false" />
     56             <TextView
     57                 android:id="@+id/widget_account_noflip"
     58                 style="@style/WidgetSubtitle"
     59                 android:layout_width="wrap_content"
     60                 android:layout_height="wrap_content"
     61                 android:freezesText="true"
     62                 android:includeFontPadding="false"/>
     63             <ViewFlipper
     64                 android:id="@+id/widget_account_unread_flipper"
     65                 android:layout_width="wrap_content"
     66                 android:layout_height="wrap_content"
     67                 android:autoStart="true"
     68                 android:flipInterval="@integer/widget_account_unread_flip_ms"
     69                 android:visibility="gone">
     70                 <TextView
     71                     android:id="@+id/widget_account"
     72                     style="@style/WidgetSubtitle"
     73                     android:layout_width="wrap_content"
     74                     android:layout_height="wrap_content"
     75                     android:freezesText="true"
     76                     android:includeFontPadding="false"/>
     77                 <!-- Note: We can't set "freezesText" on the widget_unread_count view, as the
     78                      launcher can restore stale data over updated data. -->
     79                 <TextView
     80                     android:id="@+id/widget_unread_count"
     81                     style="@style/WidgetSubtitle"
     82                     android:layout_width="wrap_content"
     83                     android:layout_height="wrap_content"
     84                     android:includeFontPadding="false" />
     85             </ViewFlipper>
     86         </LinearLayout>
     87         <ImageButton
     88             android:id="@+id/widget_compose"
     89             android:layout_width="wrap_content"
     90             android:layout_height="wrap_content"
     91             android:src="@drawable/ic_menu_compose_normal_holo_light"
     92             android:background="?android:attr/selectableItemBackground"
     93             android:paddingLeft="4dip"
     94             android:layout_gravity="center_vertical"
     95             android:contentDescription="@string/compose" />
     96     </LinearLayout>
     97     <LinearLayout
     98         android:id="@+id/widget_configuration"
     99         android:layout_width="match_parent"
    100         android:layout_height="match_parent"
    101         android:orientation="horizontal"
    102         android:gravity="center"
    103         android:background="@drawable/gradient_bg_widget_holo"
    104         android:visibility="gone">
    105         <ImageView
    106             android:src="@mipmap/ic_launcher_mail"
    107             android:layout_width="wrap_content"
    108             android:layout_height="wrap_content"
    109             android:paddingRight="8dip" />
    110         <TextView
    111             android:layout_width="wrap_content"
    112             android:layout_height="wrap_content"
    113             android:text="@string/tap_to_configure"
    114             android:textColor="@android:color/black"
    115             android:textSize="16sp"
    116             android:textStyle="bold"/>
    117     </LinearLayout>
    118     <ListView
    119         android:id="@+id/conversation_list"
    120         android:layout_width="match_parent"
    121         android:layout_height="0dip"
    122         android:layout_weight="1"
    123         android:cacheColorHint="#00000000"
    124         android:background="@drawable/gradient_bg_widget_holo"
    125         style="@style/ConversationListFade" />
    126     <TextView
    127         android:id="@+id/empty_conversation_list"
    128         android:layout_width="match_parent"
    129         android:layout_height="0dip"
    130         android:layout_weight="1"
    131         android:gravity="center"
    132         android:text="@string/loading_conversations"
    133         android:textColor="@android:color/black"
    134         android:textSize="16sp"
    135         android:textStyle="bold"
    136         android:background="@drawable/gradient_bg_widget_holo"
    137         android:visibility="gone" />
    138     <LinearLayout android:id="@+id/widget_folder_not_synced"
    139             android:layout_width="match_parent"
    140             android:layout_height="0dip"
    141             android:layout_weight="1"
    142             android:paddingLeft="24dip"
    143             android:paddingRight="24dip"
    144             android:orientation="vertical"
    145             android:gravity="center"
    146             android:background="@drawable/gradient_bg_widget_holo"
    147             android:visibility="gone" >
    148         <TextView
    149             android:layout_width="wrap_content"
    150             android:layout_height="wrap_content"
    151             android:layout_marginBottom="16dip"
    152             android:text="@string/non_synced_folder_description"
    153             android:textColor="@android:color/black"
    154             android:textSize="16sp" />
    155         <TextView
    156             android:layout_width="match_parent"
    157             android:layout_height="wrap_content"
    158             android:paddingTop="8dip"
    159             android:paddingBottom="8dip"
    160             android:text="@string/tap_to_configure_folder_sync"
    161             android:textColor="@android:color/black"
    162             android:background="@android:color/darker_gray"
    163             android:gravity="center"
    164             android:textSize="16sp"
    165             android:textStyle="bold"/>
    166     </LinearLayout>
    167 </LinearLayout>
    168