Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2011 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="match_parent"
     19     android:orientation="vertical"
     20     android:layout_marginTop="@dimen/widget_margin_top"
     21     android:layout_marginBottom="@dimen/widget_margin_bottom"
     22     android:layout_marginLeft="@dimen/widget_margin_left"
     23     android:layout_marginRight="@dimen/widget_margin_right">
     24     <!-- We define separate margins to allow for flexibility in twiddling the margins
     25          depending on device form factor and target SDK version. -->
     26     <FrameLayout
     27         android:layout_width="match_parent"
     28         android:layout_height="wrap_content">
     29         <ImageView
     30             android:id="@+id/header"
     31             android:layout_width="match_parent"
     32             android:layout_height="wrap_content"
     33             android:scaleType="fitXY"
     34             android:src="@drawable/header" />
     35         <ImageButton
     36             android:id="@+id/refresh"
     37             android:layout_width="56dp"
     38             android:layout_height="39dp"
     39             android:layout_gravity="right|top"
     40             android:layout_marginRight="15dp"
     41             android:layout_marginTop="20dp"
     42             android:background="@drawable/refresh_button" />
     43     </FrameLayout>
     44     <FrameLayout
     45         android:layout_width="match_parent"
     46         android:layout_height="match_parent"
     47         android:layout_weight="1"
     48         android:layout_gravity="center"
     49         android:background="@drawable/body">
     50         <ListView
     51             android:id="@+id/weather_list"
     52             android:layout_width="match_parent"
     53             android:layout_height="match_parent" />
     54         <TextView
     55             android:id="@+id/empty_view"
     56             android:layout_width="match_parent"
     57             android:layout_height="match_parent"
     58             android:gravity="center"
     59             android:visibility="gone"
     60             android:textColor="#ffffff"
     61             android:text="@string/empty_view_text"
     62             android:textSize="20sp" />
     63     </FrameLayout>
     64     <ImageView
     65         android:id="@+id/footer"
     66         android:layout_width="match_parent"
     67         android:layout_height="wrap_content"
     68         android:scaleType="fitXY"
     69         android:src="@drawable/footer" />
     70 </LinearLayout>
     71