안드로이드 개발 질문/답변
(글 수 45,052)
상단과 하단에 이미지가 각각 하나있고 중간에 내용이 쭈욱 있습니다.
스크롤뷰를 이용해서 상단과 하단은 이미지가 계속 고정되어있고
중간 에 내용만 스크롤생겨서 스크롤을 이동해도 상단과 하단이미지는 고정시키고 싶은데 어떻게 해야하나요~?
xml 소스는 이렇게 했는데 여기서 모르겠습니다.(지금 보여지는 소스는 전체 스크롤입니다)
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<ImageView
android:padding="0dip"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/maintop"
android:src="@drawable/maintop">
>
</ImageView>
<ImageView
android:paddingLeft="20dip"
android:paddingTop="7dip"
android:layout_alignParentTop="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/backbutton"
android:id="@+id/back"
>
</ImageView>
<ImageView
android:layout_below="@id/maintop"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/daebudo01s"
android:id="@+id/daebudo01s"
>
</ImageView>
<ImageView
android:layout_below="@id/daebudo01s"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/stop"
android:id="@+id/stop"
android:visibility="gone"
>
</ImageView>
<WebView
android:layout_below="@id/stop"
android:id="@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="visible"
>
</WebView>
<ImageView
android:layout_below="@id/webkit"
android:padding="10dip"
android:id="@+id/bmenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/bmenu"
>
</ImageView>
</RelativeLayout>
</ScrollView>
그 레이아웃을 스크롤뷰로 둘러싸면 됩니다.
"고정하고 싶은"뷰는 스크롤 뷰 밖에 있게 되겠죠....