横向滚动视图和形象的看法? [英] Horizontal scroll view and image views?
本文介绍了横向滚动视图和形象的看法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想一些图像视图添加到 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.
心连心。
这篇关于横向滚动视图和形象的看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文