2011-07-14 5 views
0

私は、次のように私のアプリでscrollviewを使用しています。しかし、私ができるだけ下にスクロールしても、画面の下部は完全には見えません。何が間違っているのですか、これを解決する方法はありますか?私はそれが動作しない場合は、
scrollview.scrollTo(0, scrollview.getBottom());
で一番下にスクロール位置を設定することができ
同じ問題があったらScrollViewがスクロールダウンしません

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

    <Button  
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Name" 
     /> 

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

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

       <TableLayout 
       android:layout_height="wrap_content" 
       android:layout_width="fill_parent" 
       android:layout_centerHorizontal="true"> 

        <TableRow> 
        <TextView 
         android:layout_height="wrap_content" 
         android:layout_width="wrap_content" 
         android:text="name"> 
        </TextView> 
        <EditText 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:layout_weight="1" 
         > 
        </EditText> 
        </TableRow> </TableLayout> </LinearLayout> </ScrollView> 

+0

画面下部の最後の項目までスクロールビューが移動しません。 – realuser

+1

私は何人かの人々が答える代わりに否定投票とコメントに興味を示す理由を知りません。 – Randroid

答えて

0

この

scrollview.scrollTo(0, scrollview.getBottom()); 
0

を試してみてください、私はこの問題を考えますあなたのAVDと一致しているので、AVDの画面サイズをAndroid SDK and AVD Managerで変更してください。あなたのAVDを選択し、適切なサイズにScaledisplay to real sizeをチェックして起動してください。

関連する問題