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

스크롤뷰 안 먹혀요 도와주세요

0 추천

스크롤뷰가 먹히질 않네요

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
   
    <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical" >

        <Button
           android:id="@+id/button1"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_alignParentLeft="true"
           android:layout_alignParentTop="true"
           android:layout_marginLeft="19dp"
           android:layout_marginTop="16dp"
           android:text="Button" />

        <TextView
           android:id="@+id/textView1"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_alignLeft="@+id/button1"
           android:layout_below="@+id/button1"
           android:layout_marginTop="22dp"
           android:paddingRight="8px"
           android:text="" />
     </RelativeLayout>

</ScrollView>

 

 

 

 

 

앤드류이드 (6,190 포인트) 님이 2013년 4월 17일 질문
앤드류이드님이 2013년 4월 17일 reshown

1개의 답변

0 추천
 
채택된 답변

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

이 부분에서 height 부분이 wrap_content로 되어 있어서 스크롤이 안되는것 같네요.

이 부분을 fill_parent 라던가 화면의 높이보다 작은 값으로 고정해 보세요.

안들오 (790 포인트) 님이 2013년 4월 17일 답변
앤드류이드님이 2013년 4월 17일 채택됨
검색해서 글을 읽어보게됬는데 fill_parent를 match_parent로 줘도 무방하죠? 구글에 검색해보니 같은 기능이라고 되어있길래 예전댓글에 글 남겨보아요.
...