2010-07-18 4 views

답변

0

바를 레이아웃 상단에 추가하고 나머지 콘텐츠는 ScrollView으로 마무리하면됩니다. 예를 들면 다음과 같습니다 헤더이 같은 사이트에 남아있는 동안

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <!-- Header --> 
    <TextView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="Your header"/> 

    <!-- rest of your layout --> 
    <ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_content"> 
      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:text="Foo"/> 
      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:text="Bar"/> 
      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:text="Baz"/> 
      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:text="etc"/> 
     </ScrollView> 
</LinearLayout> 

그런 식으로,보기의 랩 부분이 스크롤 될 것입니다.

+0

달콤한, 나는 그것을 시도 해줄거야, 고마워 크리스티안. – dhulihan

+0

+1 나는 비슷한 것을 필요로하지만 그 대신 바닥에서 떠있는 팝업이 필요합니다. 좋은 출발점! – AgentKnopf

관련 문제