2013-01-07 1 views
0

친척 및 LinearLayout으로 스크롤하려고하지만 작동하지 않습니까? 나는 몇 가지 매개 변수안드로이드를 스크롤하지 않습니까?

<LinearLayout 
    android:id="@+id/contentSobre" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <RelativeLayout 
     android:id="@+id/imageContent" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" > 

     <ImageView 
      android:id="@+id/structImageOne" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" 
      android:src="@drawable/exemple_sobre" /> 

     <ImageView 
      android:id="@+id/structImageTwo" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentRight="true" 
      android:layout_alignParentTop="true" 
      android:src="@drawable/exemple_sobre" /> 
    </RelativeLayout> 

    <TextView 
     android:id="@+id/titleSobre" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="10dp" 
     android:textSize="20sp" 
     android:textColor="#53390e" 
     android:text="SANTO GRÃO - OSCAR FREIRE" /> 


    <TextView 
     android:id="@+id/numberContact" 
     android:layout_marginTop="3dp" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="10sp" 
     android:textColor="#565656" 
     android:text="TELEFONE(s): (11) 3082-9969" /> 

    <TextView 
      android:id="@+id/descriptionSobre" 
      android:textSize="13sp" 
      android:textColor="#4a4a4a" 
      android:layout_marginTop="10dp" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:maxLines="200" 
      android:singleLine="false"    
      android:text="it does not ghave any brea this is a very long text. so long that it does not it does not ghave any brea this is a very long text. so long that it does not it does not ghave any brea this is a very long text. so long that it does not it does not ghave any brea this is a very long text. so long that it does not it does not ghave any brea this is a very long text. so long that it does not it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea this is a very long text. so long that it does not ghave any brea" /> 

    <RelativeLayout 
     android:id="@+id/buttonContent" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="10dp" > 


     <ImageButton 
      android:id="@+id/buttonCall" 
      android:layout_width="97dp" 
      android:layout_height="30dp" 
      android:scaleType="fitEnd" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" 
      android:background="@android:color/transparent" 
      android:src="@drawable/button_call_sobre" />   

     <ImageButton 
      android:id="@+id/buttonMaps" 
      android:layout_width="97dp" 
      android:layout_height="30dp" 
      android:scaleType="fitEnd" 
      android:layout_marginLeft="10dp" 
      android:background="@android:color/transparent" 
      android:layout_toRightOf="@+id/buttonCall" 
      android:src="@drawable/button_maps_sobre" /> 

     <ImageButton 
      android:id="@+id/buttonTwitter" 
      android:layout_width="34dp" 
      android:layout_height="34dp" 
      android:layout_alignParentRight="true" 
      android:layout_alignParentTop="true" 
      android:background="@android:color/transparent" 
      android:src="@drawable/button_twitter" 
      android:onClick="onTouchMenu" /> 

     <ImageButton 
      android:id="@+id/buttonFacebook" 
      android:layout_width="34dp" 
      android:layout_height="34dp" 
      android:layout_toLeftOf="@+id/buttonTwitter" 
      android:background="@android:color/transparent" 
      android:src="@drawable/button_facebook" 
      android:onClick="onTouchMenu" /> 

    </RelativeLayout> 
</LinearLayout> 

내가 상대하고있는 LinearLayout과 스크롤을 만들기 위해 노력하고 있지만 작동하지 않습니다을 위해 개발 android'm 실종에 새로운 오전? 나는 안드로이드 개발을위한 새로운 매개 변수가 없다.

답변

1

ScrollView를 Top Wrapper Layout으로 사용해야합니다 .ScrollView는 수직 스크롤 만 지원합니다. 가로 스크롤의 경우 HorizontalScrollView을 사용하십시오.

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

</ScrollView> 
0

ScrollView를 추가해야 scraallable 될 내용을 알 수있다.

0

매개 변수가 누락되었습니다. ScrollView를 사용해야합니다.

+0

스크롤 할 때 파란색 막대를 제거하는 방법 android – Nagi

+0

View.setVerticalScrollBarEnabled (false); – Gridtestmail

+0

는 xml – Nagi

0

상단 레이아웃을 ScrollView으로 설정하십시오. ScrollView은 사용자가 스크롤 할 수있는 뷰 계층 구조의 레이아웃 컨테이너로 실제 디스플레이보다 크게 표시 할 수 있습니다.

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

    Your other layout goes here and remember it can take only one child 


</ScrollView> 
+0

과 관련이 있습니다 .. 안드로이드를 스크롤 할 때 파란색 막대를 제거하는 방법 ?? – Nagi

+0

View.setVerticalScrollBarEnabled (false); – Gridtestmail

+0

은 xml과 관련이 있습니다 ?? – Nagi

1

선형 레이아웃을 스크롤해야하는 경우에는 scrollview로 감싸 야합니다. 필요한 것은 무엇입니까?

0

그냥 최상위 레이아웃 있는 ScrollView합니다. ScrollView은 사용자가 스크롤 할 수있는 뷰 계층 구조의 레이아웃 컨테이너로 실제 디스플레이보다 크게 표시 할 수 있습니다.

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

      <!-- Put everything you already have here --> 

    </ScrollView> 
관련 문제