안에있는 LinearLayout
내의 여러 항목에 레이아웃 가중치를 지정하고 싶습니다. 그러나 ScrollView
은 LinearLayout
weightSum
을 무시합니다.레이아웃 가중치가 ScrollView 내에서 작동하지 않습니다.
목표는 2, 1, 1의 가중치로 레이아웃을 나누는 것입니다 (총 합계는 4). 그러나 이는 ScrollView
내부에서 올바르게 작동하지 않습니다.
이 레이아웃 문제를 어떻게 해결할 수 있습니까?
main.xml에
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="4">
<LinearLayout android:id="@+id/logo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="2"
android:background="#FFFFFF" />
<LinearLayout android:id="@+id/logo1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
android:background="#000000" />
<LinearLayout android:id="@+id/logobutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:background="#4B4B4B" />
</LinearLayout>
</ScrollView>
작업을하지만 –
확인이 하나 작동하지 않을 것보다 내 질문시 사용있는 ScrollView 경우보다 난 단지있는 ScrollView를 제거하고 경우 : [안드로이드 레이아웃 무게 (http://stackoverflow.com/questions/4986861/를 android-layout-weight) 나는 같은 종류의 문제라고 생각한다. – user1264255