0

カスタム ビューを作成し、複数のビューをスクロール リストに挿入したいのですが、常に 1 つのビューしか表示されません。

  <ScrollView 
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_below="@+id/buttonsPart"
  android:id="@+id/scrollView1"
  android:background="@drawable/greylayer">

  <LinearLayout 
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

       <com.test.app.canvas.MatchCanvas
      android:layout_width="fill_parent"
      android:layout_height="400px"/>

      <com.test.app.canvas.MatchCanvas
      android:layout_width="fill_parent"
      android:layout_height="400px"/>

  </LinearLayout>

ScrollView にできるだけ多くのカスタム ビューを挿入することは簡単に可能だと思いますが、どういうわけか、まだ MatchCanvas のインスタンスが 1 つしかありません。私は何をすべきか?

4

1 に答える 1

4

デフォルトでは、LinearLayoutは水平であるためandroid:orientation="vertical"、LinearLayoutに追加して問題を解決します。

于 2012-07-26T20:27:54.030 に答える