- listview with header and footer
- <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:background="#ffffff">
- <!-- Header Starts-->
- <LinearLayout android:id="@+id/header"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@layout/header_gradient"
- android:layout_margin="5dip"
- android:paddingTop="13dip"
- android:paddingBottom="8dip">
- <!-- Logo Start-->
- <ImageView android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" />
- <!-- Logo Ends -->
- </LinearLayout>
- <!-- Header Ends -->
- <!-- Content -->
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent"
- android:orientation="vertical"
- android:gravity="center">
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_margin="5dip">
- <EditText android:id="@+id/searchText"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
- <ImageButton android:id="@+id/searchButton"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@android:drawable/ic_menu_search" />
- </LinearLayout>
- <ListView android:id="@+id/lstNews"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip" />
- </LinearLayout>
- <!-- Footer Start -->
- <LinearLayout android:id="@+id/footer"
- android:layout_width="fill_parent"
- android:layout_height="30dip"
- android:background="@layout/footer_gradient"
- android:layout_margin="5dip"
- android:paddingTop="5dip"
- android:paddingLeft="5dip"
- android:layout_alignParentBottom="true">
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:text="Instituto Superior de " />
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textStyle="bold" android:text="Engenharia" />
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:text=" do Porto" />
- </LinearLayout>
- <!-- Footer Ends --></LinearLayout>
- <!-- Header Starts-->
- <LinearLayout android:id="@+id/header"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@layout/header_gradient"
- android:layout_margin="5dip"
- android:paddingTop="13dip"
- android:paddingBottom="8dip"
- android:layout_above="@id/content">
- <!-- Content -->
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/content"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent"
- android:orientation="vertical"
- android:gravity="center"
- android:layout_above="@id/footer">