我想一些图像视图添加到 HorizontalScrollView
动态。我有我的滚动视图:
I want to add a number of image views to a HorizontalScrollView
dynamically.
I have my scroll view:
myScroller = new HorizontalScrollView(this);
然后:
myScroller.addView(myImageView1);
这工作,但我想多个图像视图添加到滚动条,那么它不工作。
This works, but I want to add more than one image view to the scroller, then it doesnt work.
任何想法?
HorizontalScrollView只能有1个小孩,所以你需要把所有的图像水平的LinearLayout内,将其添加到HorizontalScrollView。
HorizontalScrollView can only have 1 child, so you need to put all the images inside a horizontal linearLayout and add it to the HorizontalScrollView.
心连心。
上一篇:Android模拟器错误: - 执行/系统/斌/ e2fsck的失败:没有这样的文件或目录模拟器、错误、文件、目录
下一篇:android.database.sqlite.SQLiteConstraintException:错误code 19:约束失败错误、sqlite、android、database