0

私はTableLayoutの中にTableRowを持っています。 TableRowに垂直ScrollViewを配置すると、期待通りに機能します。しかし、TableRowにHorizo​​ntalScrollViewを配置すると、スクロールはまったく機能しません。TableRow内のHorizo​​ntalScrollView

これはなぜ起こるのですか?それを達成するための回避策を使用できますか?

ありがとうございます!ここで

--EDIT--

例です。

<?xml version="1.0" encoding="utf-8"?> 
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <TableRow> 
     <HorizontalScrollView android:scrollbars="horizontal" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 

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

       <TableRow> 
        <Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" /> 
        <Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" /> 
       </TableRow> 
       <TableRow> 
        <Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" /> 
        <Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" /> 
       </TableRow> 
      </TableLayout> 

     </HorizontalScrollView> 

    </TableRow> 

</TableLayout> 

私は垂直ScrollViewにHorizo​​ntalScrollView変更すると、それは(明らかに垂直)動作します。

これはparrentで利用可能な場所のサイズのコンテンツinsteatのサイズ(コンテンツサイズ)にScrollViewを設定する必要があります。

+0

レイアウトxmlと関連するJavaを投稿してください。 – Krylez

+0

これを解決しましたか? –

答えて

0

<HorizontalScrollView android:scrollbars="horizontal" 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent"> 

編集をしてみてください。

+0

ようこそStackOverflowへ。あなたはあなたの答えにいくつかの説明を追加したいかもしれません(なぜこれが問題を解決するかなど)、あるいはあなたの将来の答えに留意してください。 – hlt