안드로이드 개발 질문/답변
(글 수 45,052)
테스트 기기는 갤럭시 s구요
제가 하고 싶은건 웹뷰에서 재생되는 동영상위에 이미지뷰로 가운데만 뚫려있는 이미지를 보여줘서 이미지를 어느정도
가려지면서 보이기를 원하고 있습니다. 그래서 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" >
<WebView
android:id="@+id/alpha_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ImageView
android:id="@+id/bg_swf"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/bg_swf"
/>
</RelativeLayout>
이렇게 사용중인데 웹뷰가 자꾸 위로 올라오고 이미지뷰가 밑에 깔려버립니다. 해결방법이 있을까요???
2012.06.01 16:17:00
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/alpha_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ImageView
android:id="@+id/bg_swf"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/bg_swf"
/>
</FrameLayout>
이렇게 변경했지만 여전히 같은 증상으로 웹뷰가 위로 올라오는 현상이 발생하네요.
2012.06.01 17:19:37
편법인거 같기는 한데 이렇게 한번 해보시겠어요;;
안될수도 있습니다.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<WebView
android:id="@+id/alpha_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/bg_swf"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/bg_swf"
/>
</LinearLayout>
</FrameLayout>




렐러티브는 위치를 확실히 정해주지 않으면 역순으로 화면에 표시됩니다.
이미지 뷰와 웹뷰의 위치를 바꿔보시던가 이미지 뷰를 웹뷰의 밑에 표시되도록 속성을 지정해주세요.