마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

scrollview에서 weight가 잘안먹혀요

0 추천

안녕하세요 안드로이드펍 가족님들.

화면을 비율로 구분하기위해서 weight를 이용하는데요.

스크롤뷰가 없을때는 원하는데로 딱 잘나누어지는데

스크롤뷰를 밑에 깔고 weight로 하면 잘나누어지지않습니다.

 <LinearLayout

            android:layout_width="fill_parent"

            android:layout_height="fill_parent"

            android:orientation="vertical" >

 

            <LinearLayout

                android:layout_width="match_parent"

                android:layout_height="0dp"

                android:layout_weight="1390"

                android:background="#fff"

                android:orientation="vertical" >

            </LinearLayout>

 

            <LinearLayout

                android:layout_width="match_parent"

                android:layout_height="0dp"

                android:layout_weight="530"

                android:background="#53cf2d"

                android:orientation="vertical" >

            </LinearLayout>

        </LinearLayout>

 

아래소스로 하니 그냥 검은색 화면으로 리스너드링 자리를 못잡습니다 

ScrollView위에서도 비율잘나눌수있는 방법점

 <ScrollView

            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" >

 

                <LinearLayout

                    android:layout_width="match_parent"

                    android:layout_height="0dp"

                    android:layout_weight="1390"

                    android:background="#fff"

                    android:orientation="vertical" >

                </LinearLayout>

 

                <LinearLayout

                    android:layout_width="match_parent"

                    android:layout_height="0dp"

                    android:layout_weight="530"

                    android:background="#53cf2d"

                    android:orientation="vertical" >

                </LinearLayout>

            </LinearLayout>

 

        </ScrollView>

흠바바 1 (4,000 포인트) 님이 2013년 11월 1일 질문

1개의 답변

0 추천
 
채택된 답변
건방진프로그래머 (26,630 포인트) 님이 2013년 11월 2일 답변
흠바바 1님이 2013년 11월 4일 채택됨
건방진프로그래머님 많은 도움이 되었습니다 감사합니다.^^
...