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

웹뷰하단에 다른레이아웃을 놓고싶은데 웹뷰 heigh가 길어지면 안보입니다.

0 추천
제목그대로 웹뷰하단에 리사이클러뷰를 놓고자하는데 이게 웹뷰가 길어지니 가려져서 안보이네요.

웹뷰가 길어져도 웹뷰아래 있도록 할 수 있는 방법이 없을까요?
뉴비는한달만 (280 포인트) 님이 2016년 9월 27일 질문

1개의 답변

0 추천
 
채택된 답변
웹뷰 height=match_parent 그리고  weight값으로 1을 넣고

하단에 넣을 view에 height를 wrap_content로 설정해보세요.
Development Guy (70,570 포인트) 님이 2016년 9월 27일 답변
뉴비는한달만님이 2016년 9월 29일 채택됨
<LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <LinearLayout
                    android:id="@+id/toplayout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/border"
                    android:orientation="horizontal"
                    android:paddingLeft="7dp">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="40dp"
                        android:layout_gravity="center"
                        android:src="@drawable/snsb_icon_big"></ImageView>

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/contentTitle"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:ellipsize="none"
                            android:maxLines="2"
                            android:scrollHorizontally="false"
                            android:singleLine="false"
                            android:textColor="#000000"
                            android:textSize="20dp"
                            android:textStyle="bold" />

                        <TextView
                            android:id="@+id/contentRegDate"
                            android:layout_width="wrap_content"
                            android:layout_height="20dp"
                            android:textSize="12dp" />

                    </LinearLayout>

                </LinearLayout>

                <RelativeLayout
                    android:id="@+id/middlelayout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_below="@id/toplayout"
                    android:layout_above="@+id/bottomlayout"
                    android:layout_weight="1">

                    <WebView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:id="@+id/contentWebView">
                    </WebView>

                </RelativeLayout>

                <RelativeLayout
                    android:id="@+id/bottomlayout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:layout_alignParentBottom="true">

                    <android.support.v7.widget.RecyclerView
                        android:id="@+id/replyList"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">
                    </android.support.v7.widget.RecyclerView>

                </RelativeLayout>
            </LinearLayout>

이런식으로 해봤는데 되질 않습니다..
RelativeLayout이네요. 꼭 RelativeLayout을 써야 하는 상황인가요?
LinearLayout으로 하면 제가 말씀드린대로 하면 될텐데요.
해결했습니다 감사합니다~!
...