스크롤 : 웹보기는 방지 모두 내가 원하는
- 에 포함 된 화면에 조각을 넣어 :
- 이 ... 그것의 전체 높이로 확장 웹뷰는
- 에 포함
- 위와 아래 고정 된 크기의 레이아웃
- 레이아웃을 스크롤하십시오 (예 : 전체 높이 webview를 포함한 전체)
이것은 불가능한 것처럼 보입니다. 지금은 Android WebView에서 다른 중요한 버그를 다루는 10 가지 이상의 다른 질문/답변을 읽었으나이 상황을 다루지는 않습니다. 예를 들어, 높이 결코 : - :
그것은 그 (다른 질문에 읽기, 안드로이드 사이트에 현재 고정되지 않은 버그에 대한 링크를 다음에서) 보인다 4
- 웹보기의 높이가 항상 잘못 (고정되지 않은 안드로이드이있다 감소)
- 순차적 인 안드로이드 릴리스에서 WebView의 스크롤이 끊어 지거나 끊어지지 않고 재분할됩니다 (예 : ScrollView가 제어하는 일부 릴리스, WebView가 제어하는 다른 릴리스, "싸우거나"끊어지는 등)
- ScrollView에서 기묘한 조작을 사용하여 out-of-t로 수행해야하는 작업을 수행해야합니다. he-box. 예 : "안드로이드는 : fillViewport는 ="사실은 "(layout_height = fill_parent가"어떻게해야합니까? 응이 정확히 무엇을하지? ")
사람이 비교적 간단하고 일반적인 설정을 달성하기 위해 노력하고 코드가 있습니까 나 '? (물론 "안드로이드 애플 리케이션을 버리고 웹 애플리케이션을 작성하는 것"을 제외하고는 효과가 있을지 모르지만 슬프게도 비현실적입니다.)
참고로 (그리고 비슷한 것을 시도하는 다른 누군가를 위해) 여기 내 레이아웃이 화면을 채 웁니다. 그러나 스크롤 할 수없는 이유는 다음과 같습니다.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- page header -->
<RelativeLayout
android:id="@+id/fragment_detailspage_titletext_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:visibility="visible" >
<include
android:id="@+id/fragment_detailspage_titletext_include"
layout="@layout/include_textheader"
android:visibility="visible" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/fragment_detailspage_header_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/fragment_detailspage_titletext_layout"
android:clickable="true"
android:visibility="visible" >
<!-- logo image -->
<include
android:id="@+id/fragment_detailspage_logoimageheader_include"
layout="@layout/include_logoimageheader" />
</RelativeLayout>
<!-- page footer -->
<RelativeLayout
android:id="@+id/fragment_detailspage_footer_layout"
android:layout_width="fill_parent"
android:layout_height="64dp"
android:layout_alignParentBottom="true"
android:background="@drawable/generic_button_not_pressed"
android:clickable="true"
android:visibility="visible" >
<!-- 1 buttons -->
<include
android:id="@+id/fragment_detailspage_bottombuttonstrip1_include"
android:layout_width="wrap_content"
android:layout_height="64dp"
android:layout_centerHorizontal="true"
layout="@layout/include_bottombuttonstrip1" />
</RelativeLayout>
<!-- page content -->
<WebView
android:id="@+id/fragment_detailspage_content_web"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/fragment_detailspage_footer_layout"
android:layout_below="@id/fragment_detailspage_header_layout"
android:visibility="visible" />
</RelativeLayout>
</ScrollView>
이 게시물을 보셨나요? http://stackoverflow.com/a/13353874/801437 –
"이제는 Android WebView의 다양한 치명적인 버그를 다루는 10 가지 이상의 다른 질문/답변을 읽었으나이 상황을 다루지는 않습니다."- 나는 많은 안드로이드 관련 질문에 대답했다. 스크롤 가능한 내용을'ScrollView '에 두는 일은 거의 잘되지 않는다. – CommonsWare
CommonsWare의 관점에서 볼 때, 스크롤 가능한 뷰를 ScrollView에 두지 마십시오. 귀하의 레이아웃은 다소 지나치게 설계된 것처럼 보입니다. 레이아웃에 원하는 레이아웃을 Q에 첨부하면 xml을 단순화하고 ScrollView에서 WebView가 필요하지 않은 이유를 설명 할 수 있습니다. – Blundell