에 의해 차단하기 : XMLFile1.xml를있는 ScrollView는이 같은 디자인이 선형 레이아웃
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/option_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:name="question_paper_scrollView"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</ScrollView>
</RelativeLayout>
내가 this 또한 설정에 따라 ScrollView
에서 android:fillViewport="true"
을 설정 한
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent">
<include layout=XMLFile1.xml>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:gravity="center|bottom"
android:weightSum="4"/>
</RelativeLayout>
XMLFile2.xml this에 따라 의 minimumHeight()
FrameLayout
은 퀴즈 질문을 보유하고 스크롤 할 수 있어야하며 LinearLayout
은 다음, 이전 및 삭제와 같은 버튼 집합으로 구성됩니다. 나는 thisLinearLayout
에서 ScrollView
을 숨길 수 있지만 ScrollBar를 볼 수 있습니다. 달성 할 수있는 올바른 방법은 무엇입니까? 추 신 : LinearLayout
을 사용하도록 제한되어 있습니다. 왜냐하면 화면 하단에 버튼 세트가 필요하고 데이터베이스에서 퀴즈 질문을 동적으로로드하기 때문에 FrameLayout
을 사용하기 때문입니다.
해결 방법 : 답안 모두를 조합하십시오. 모든 레이아웃에서 wrap_content를 사용하고 선형 레이아웃의 사용자 layout_below 속성을 사용하십시오.
레이아웃의 속성을 표시합니다. – Dabiuteef
@Dabiuteef는 속성을 추가했습니다 –
아마도 이것도 가능합니다 : LinearLayout의 android : layout_height를 wrap_content로 변경하고 android : layout_above = ""를 include 태그에 추가하십시오. –
Dabiuteef