2013-07-13 4 views
0

이것은 내 전체 코드입니다. 그것은 잘 작동하지만 문제는 스크롤보기가 작동하지 않고 마지막 3 개의 버튼이 스크롤에 표시되지 않습니다. 마지막 3 개의 버튼을 스크롤하고 보는 방법은 무엇입니까? 스크롤보기를 사용하여 모든 화면을 보는 방법은 무엇입니까?내 코드에서 sscroll보기가 작동하지 않습니다.

    <?xml version="1.0" encoding="UTF-8"?> 

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/scroller" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:fillViewport="true" > 
<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:background="@color/background" 
android:orientation="vertical" > 

<RelativeLayout 

android:layout_height="wrap_content" 
android:background="@drawable/titlebar_background" 
android:layout_width="fill_parent"> 

<ImageView 
    android:id="@+id/test_button_image"  
    android:layout_width="wrap_content" 
    android:src="@drawable/icon" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true"> 
</ImageView> 

<TextView 
    android:id="@+id/test_button_text2" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textSize="20sp" 
    android:layout_alignTop="@+id/test_button_image" 
    android:layout_toRightOf="@+id/test_button_image" 
    android:textColor="#ffffff" 
    android:text="San Diego Unified"> 
</TextView> 
<TextView 
    android:id="@+id/test_button_text1" 
    android:layout_width="wrap_content" 
    android:textColor="#ffffff" 
    android:text="SCHOOL DISTRICT" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/test_button_text2" 
    android:layout_alignLeft="@+id/test_button_text2"> 
</TextView> 
</RelativeLayout> 


<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 

android:orientation="horizontal" > 
<TextView 
    android:layout_width="0dp" 
    android:layout_height="wrap_content" 
    android:layout_gravity="left|center_vertical" 
    android:layout_weight="1" 
    android:ellipsize="end" 
    android:gravity="left|center_vertical" 
    android:singleLine="true" 
    android:textColor="#ffffff" 
    android:text="HEALTHY BODIES HEALTHY MINDS " 
    android:textSize="12sp" /> 
<ImageButton 
    android:id="@+id/button" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/facebook" /> 
    <ImageButton 
    android:id="@+id/button" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/twitter" 
    android:text="Button Text" /> 
    </LinearLayout> 
    <RelativeLayout 

    android:layout_height="wrap_content" 

    android:layout_width="fill_parent"> 
    <EditText 
    android:id="@+id/EditText01" 

    android:layout_alignParentLeft="true" 
    android:layout_width="fill_parent" 
    android:background="#a8a8a8" 
    android:paddingTop="15dp" 
    android:hint="SEARCH SCHOOL BY NAME" 
    android:layout_toLeftOf="@+id/Button01" 
    android:layout_height="wrap_content"> 

</EditText> 



    <!-- 

    <Button 
    android:id="@+id/Button01" 
    android:text="Press Here!" 
    android:layout_width="wrap_content" 
    android:layout_alignParentRight="true" 
    android:layout_height="wrap_content"> 




</Button> 

--> 


    <ImageButton 
android:id="@+id/ImageButton01" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignParentRight="true" 
android:src="@drawable/title_search" 
/> 

</RelativeLayout> 


<RelativeLayout 

    android:layout_height="wrap_content" 

android:layout_width="fill_parent"> 

<ImageView 
    android:id="@+id/test_button_image"  
    android:layout_width="wrap_content" 
    android:src="@drawable/icon" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true"> 
</ImageView> 

<TextView 
    android:id="@+id/test_button_text2" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textSize="14sp" 
    android:layout_alignTop="@+id/test_button_image" 
    android:layout_toRightOf="@+id/test_button_image" 
    android:textColor="#ffffff" 
    android:singleLine="false" 
    android:text="Our Mission is to nourish our students so they can be fueled and 
ready to learn because we believe Healthy Bodies Mean Healthy Minds .our farm to 
school and garden to school programs promote healthy eating habits"> 
</TextView> 

    </RelativeLayout> 
<View 
android:layout_width="fill_parent" 
android:layout_height="1dp" 
android:background="#000000"/> 



    <LinearLayout 
    android:id="@+id/lytContent" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" 
    android:layout_below="@+id/lytTitlebar" 
    android:layout_above="@+id/txtCopyright"> 


    <TextView 
     android:id="@+id/txtCaption" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/caption" 
     android:textColor="@color/text" 
     android:textStyle="bold" 
     android:textSize="10sp" 
     android:text="SELECT A SCHOOL TO VIEW LUNCH OR BREAKFAST MENUS" 
     android:paddingLeft="10dp" 
     android:paddingTop="3dp" 
     android:paddingBottom="3dp"/> 
    <ListView 
     android:id="@+id/listMainMenu" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:fadeScrollbars="true" 
     android:divider="@color/background" 
     android:dividerHeight="1dip"/> 
</LinearLayout> 
<!--  
    <RelativeLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" > 
    --> 

<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 

    android:background="#a8a8a8" 
android:orientation="horizontal" > 

<Button 
    android:id="@+id/button1" 
    android:layout_width="wrap_content" 

     android:textSize="10dp" 
    android:layout_height="wrap_content" 
    android:text="FARM TO SCHOOL" /> 

<Button 
    android:id="@+id/button2" 
    android:layout_width="wrap_content" 
    android:textSize="10dp" 

    android:layout_height="wrap_content" 
    android:text="TAKE A SURVEY" /> 

<Button 
    android:id="@+id/button3" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="SHARE THIS APP" 
    android:textSize="10dp" 
    /> 

    </LinearLayout> 

</LinearLayout> 
</ScrollView> 
+0

안드로이드 제거하여 한 번 코드를 확인하십시오 : fillViewport는 = "true"로. 그것은 작동해야합니다 – silwar

+0

이 줄을 제거 steevoo

답변

0

설정 안드로이드 : layout_marginBottom = "100dip"당신의 마지막에 배치

관련 문제