1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2007 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 17<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:orientation="vertical" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent"> 21 22 <LinearLayout 23 android:orientation="horizontal" 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content"> 26 27 <Button android:id="@+id/add" 28 android:layout_width="wrap_content" 29 android:layout_height="wrap_content" 30 android:text="@string/list_8_new_photo"/> 31 32 <Button android:id="@+id/clear" 33 android:layout_width="wrap_content" 34 android:layout_height="wrap_content" 35 android:text="@string/list_8_clear_photos"/> 36 37 </LinearLayout> 38 39 <!-- The frame layout is here since we will be showing either 40 the empty view or the list view. --> 41 <FrameLayout 42 android:layout_width="match_parent" 43 android:layout_height="0dip" 44 android:layout_weight="1" > 45 <!-- Here is the list. Since we are using a ListActivity, we 46 have to call it "@android:id/list" so ListActivity will 47 find it --> 48 <ListView android:id="@android:id/list" 49 android:layout_width="match_parent" 50 android:layout_height="match_parent" 51 android:drawSelectorOnTop="false"/> 52 53 <!-- Here is the view to show if the list is emtpy --> 54 <TextView android:id="@+id/empty" 55 android:layout_width="match_parent" 56 android:layout_height="match_parent" 57 android:text="@string/list_8_no_photos"/> 58 59 </FrameLayout> 60 61</LinearLayout> 62