0
내 안드로이드 애플 리케이션을위한 사용자 정의 헤더를 만들어야합니다. 내가 만들 수있는 방법을 모르기 때문에 나는 지금유체 헤더가있는 Android 레이아웃
+----------------+------------+
| | |
| background | Logo |
| repeat | fixed |
| | right |
+----------------+------------+
| |
| |
| content (list) |
| |
| |
| |
+-----------------------------+
| footer repeat |
+-----------------------------+
내가 목록에 대한 XML을 작성,하지만 난 헤더에 문제가 같은 것을 만들 것입니다 그것을
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#fff" >
<RelativeLayout
android:id="@+id/top_control_bar"
android:layout_width="fill_parent"
android:layout_height="88dp" >
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:background="@drawable/top_menu_bg_tile"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="88dp"
android:src="@drawable/top_menu" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/bottom_control_bar"
android:layout_width="fill_parent"
android:layout_height="28dp"
android:layout_alignParentBottom="true">
<ImageView
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_alignParentBottom="true"
android:src="@drawable/bottom_menu" />
</RelativeLayout>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/bottom_control_bar"
android:layout_below="@id/top_control_bar" >
</ListView>
또한 상대 레이아웃이 내가 tablelayout을 작성해야하는 가장 좋은 방법인지 알아야합니다.