2013-06-20 4 views
0

나는 서랍을 가지고 있으며 그 안에 scrollview를 넣었습니다. 텍스트보기에는 많은 텍스트가 포함되어 있습니다. 슬라이딩 서랍의 높이를 100 디프로 제한했지만 스크롤 할 수없는 것 같습니다. 도와주세요.Android : ScrollView가 제대로 작동하지 않습니다.

다음은 XML의 조각의 다음있는 ScrollView에 당신의 내면의 상대적보기에서 ContentLayout ID를 변경

<SlidingDrawer 
    android:id="@+id/slidingDrawer" 
    android:handle="@+id/drawerHandle" 
    android:content="@+id/contentLayout" 
    android:layout_width="wrap_content" 
    android:layout_height="100dip" 
    android:orientation="horizontal" 
    android:layout_gravity="center_vertical"> 

    <RelativeLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/handlerl" 
     android:paddingBottom="0dp"> 

     <ImageView 
      android:id="@+id/drawerHandle" 
      android:src="@drawable/help_tab_selector" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentRight="true" > 
     </ImageView> 

    </RelativeLayout> 

    <ScrollView 
     android:id="@+id/inner" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" > 

    <RelativeLayout 
     android:id="@+id/contentLayout" 
     android:gravity="center" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:background="#B0B0B0"> 



     <TextView 
      android:id="@+id/helptv1" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content" 
      android:text="• Hello this contains a very long text" 
      android:paddingTop="5dp" 
      android:paddingBottom="5dp" 
      android:paddingLeft="5dp" 
      android:paddingRight="5dp" 
      android:textColor="#000000"> 
     </TextView> 

     <TextView 
      android:id="@+id/helptv2" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content" 
      android:layout_below="@+id/helptv1" 
      android:text="• Hello this contains a very long text" 
      android:paddingTop="5dp" 
      android:paddingBottom="5dp" 
      android:paddingLeft="5dp" 
      android:paddingRight="5dp" 
      android:textColor="#000000"> 
     </TextView> 

     <TextView 
      android:id="@+id/helptv3" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content" 
      android:layout_below="@+id/helptv2" 
      android:text="• Hello this contains a very long text" 
      android:paddingTop="5dp" 
      android:paddingBottom="5dp" 
      android:paddingLeft="5dp" 
      android:paddingRight="5dp" 
      android:textColor="#000000"> 
     </TextView> 



    </RelativeLayout> 
    </ScrollView> 


</SlidingDrawer> 
+0

relativelayout의 두 속성에 모두 matchparent를 추가하십시오. 그리고 슬라이딩 서랍 너비는 부모와 일치해야합니다 – amalBit

+0

그건 도움이되지 않았다. – tintin

답변

0

시도는 도움 있는지.

그 외에도 확실하지 않습니다. ScrollView는 사기꾼입니다 ...

+0

나는 당신이하고 싶은 말을 정말로 얻지 못했습니다. 조금 더 자세히 설명해 주시겠습니까? – tintin

+0

고마워요. 그랬어. – tintin

+0

사과 친구, 나는 조금 밖에 나가야했다. 상위 ScrollView 요소를 무시하고 내부 RelativeLayout 요소를 SlidingDrawer 요소의 시작점으로 보는 것이 그 원인 일 수 있습니다. 그건 내 걸릴거야하지만 나는 그것을 오해하고 있습니다. 여전히 호기심이 있다면 조금만 놀아 라. handle/content 요소가 어떻게 재생되는지 확인하십시오. 나는 그것을 의도적으로 깨는 것이 내가 익숙하지 않은 무언가의 경계를 설정하는 데 도움이된다는 것을 알게된다. 감사합니다. 스코어 – StevieJayCee

관련 문제