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

스크롤뷰 질문입니다.(초보적인 질문)

0 추천
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="10"
        android:background="#ffffffff">
        
        <HorizontalScrollView 
            android:id="@+id/horScrollView01"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
  
            <ScrollView
                android:id="@+id/scrollView01"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#ffffffff"
                >
                        
	<LinearLayout 
	    android:layout_width="match_parent"
	    android:layout_height="match_parent"
	    android:orientation="vertical"
	    >
        
                    
                    <ImageView
                        android:id="@+id/imageView01"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_horizontal"
                        android:adjustViewBounds="true"
                        android:src="@drawable/image1"
                        />
                    
              </LinearLayout>
                
                
            </ScrollView>
                        </HorizontalScrollView>
            
            
      
        
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="3"
        android:background="#ffffff00">
        
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="10"
        android:background="#ffff00ff">
        
    </LinearLayout>
    
    
    
    
    
</LinearLayout>

스크롤뷰의 사용에 관해서 질문좀 드릴려고 합니다. 초보적인 질문인데 입문한지가 얼마안되서..

제가 하고자 하는것은 레이아웃을 3등분으로 나눠서 상단 하단 크기의 스크롤을 배치

상단 하단 각자 다른 이미지뷰를 넣고 보여주는건데

저렇게 하면 상단 스크롤에 들어간 이미지뷰의 크기가 너무 커져서..

아래 레이아웃을 가리게 되더군요...

스크롤뷰의 사이즈가 이미지뷰의 사이즈만큼 동적으로 움직이지 않게 하려면 어떻게 해야합니까 ㅠ? 도움좀 부탁드립니다 

gps1215 (140 포인트) 님이 2014년 1월 21일 질문

1개의 답변

0 추천

우선 line 15 수정해 주세요

android:layout_height="match_parent"   ->    android:layout_height="wrap_content"

슈루슈 (2,610 포인트) 님이 2014년 1월 21일 답변
...