신청서에 SlidingDrawer
을 사용했습니다. 이제 스크롤보기를 추가하고 싶습니다. 나는 그렇게하려고 노력했다. 그러나 그것은 나에게 미끄러지는 서랍이 치수를 가져야한다는 오류를 준다.
아무도 나를 도울 수 있습니까?서랍에서 스크롤보기 추가 서랍
0
A
답변
1
있는 ScrollView를 들어, 적어도 입력해야합니다 : 당신은 얀 MASOCH가 오류 메시지를 제거하는 말한대로 layout_width와 layout_height 설정해야
<ScrollView
android:layout_width="fill_parent or wrap_content or your value"
android:layout_height="fill_parent or wrap_content or your value" >
</ScrollView>
1
.
slidedrawer가 scroll과 함께 작동하려면 linearLayout 대신 scrollview에서 id를 id/content로 설정해야합니다. 스크롤이있는 SlidingDrawer의 예는 다음과 같습니다.
<SlidingDrawer
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:handle="@+id/handle"
android:content="@+id/content">
<Button
android:id="@id/handle"
android:layout_width="88dip"
android:layout_height="44dip"
android:background="@drawable/btn_blue"
android:text="help"
android:textColor="#ffffff"/>
<ScrollView
android:id="@id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
(other TextViews etc)
</LinearLayout>
</ScrollView>
</SlidingDrawer>
정확한 오류 메시지를 붙여 넣습니다. – C0deAttack