2012-04-12 5 views
0

나는 댓글 목록을 표시 한 다음 더 많은 댓글을 달 수있는 사람들을위한 텍스트 영역을 표시하는 활동이 있습니다.안드로이드 - 페이지의 다른 요소가없는 스크롤 목록

지금은 화면 하단에 몇 개의 설명이있는 경우 텍스트 영역에 덮어 씁니다.

전체 페이지를 주석 및 텍스트 영역과 함께 스크롤 할 수 있다면 더 좋을 것입니다.

<?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" 
     >   

<ScrollView 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" >  

<TextView 
    android:id="@+id/question_label"  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Your question: " 
    />  

<TextView 
    android:id="@+id/question"  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="" 
    />  

<TextView 
    android:id="@+id/please_wait"  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Please wait while the discussion loads..." 
    />  

    <ListView 
    android:id="@android:id/list" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@+id/label" 
     android:textSize="20px" >   
    </ListView> 

     <EditText 
      android:id="@+id/question_text" 
      android:layout_height="wrap_content" 
      android:hint="@string/question_comment_hint" 
      android:inputType="textMultiLine" 
      android:lines="5" 
      android:layout_width="fill_parent"> 
     </EditText> 

<Button 
      android:id="@+id/submit" 
      android:layout_height="wrap_content" 
      android:text="@string/submit" 
      android:onClick="sendFeedback" 
      android:layout_width="fill_parent"> 
     </Button>    

    </LinearLayout> 
</ScrollView> 

</LinearLayout> 

감사 :

여기에 내 현재의 레이아웃 XML입니다!

+1

의견을 남기려면 매번 맨 아래로 스크롤해야만한다면 나는 좌절 한 사용자 일 것입니다. :). edittext와 버튼을 스크롤 뷰 바깥에 두지 않으시겠습니까? 그러면 사용자는 목록을 보면서 언제든지 주석을 추가 할 수 있습니다. – Jack

+1

scrollview 내부에리스트 뷰가 없어야합니다. – dmon

+0

@Jack과 합의했습니다. 나는 당신이 새로운 코멘트를 입력 할 수있는 대화 상자를 불러올 "새로운 코멘트"옵션 인 메뉴 옵션 또는 액션 바 옵션을 가지고 있다고 생각한다. (당신이 빌드하고있는 안드로이드 버전에 따라 다름) – dymmeh

답변

1

목록보기 (view.setFooterView())에 꼬리말을 사용하십시오. 설명은 here입니다.

그리고 listview와 scrollview를 동시에 사용하지 마십시오. Listview는 여기서 충분합니다.

관련 문제