<?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"> <TextView android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="32dip" android:layout_alignParentTop="true" android:background="#FFFF0000" android:text="header" /> <TextView android:id="@+id/footer" android:layout_width="fill_parent" android:layout_height="32dip" android:layout_alignParentBottom="true" android:background="#FF0000FF" android:text="footer" /> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/header" android:layout_above="@id/footer"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/edit_text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="text" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF00FF00" android:text="@string/long_text" /> </LinearLayout> </ScrollView> </RelativeLayout>
AndroLab
このブログでは、Android(アンドロイド)アプリ開発技術をまとめています。
コードをコピペするときは、テキスト領域の上部にある“view plain”から行うと綺麗に行えます。
コードや説明に誤りがありましたら、コメント欄に一言いただけると大変助かります。
コードを直接選択してコピペすると、行の先頭に“#”が入ってしまいますのでご注意ください。
2010年12月4日土曜日
ScrollViewをヘッダとフッタではさむ
コンテンツはスクロールされ、ヘッダとフッタは固定されます。
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿