Reputation: 2079
I created custom view and want to insert multiple numbers of it to the Scroll list, but always only one view is displayed:
<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>
I believe its easily possible to insert as many custom views to ScrollView, but somehow I still have only 1 instance of MatchCanvas. What should I do?
Upvotes: 0
Views: 899
Reputation: 29121
By default LinearLayout is horizontal, so add android:orientation="vertical"
to the LinearLayout to resolve the issue.
Upvotes: 4