开发者

Android: How do I evenly space images in a ScrollView?

I want to evenly space a vertical row of images in a开发者_如何学编程 ScrollView.

I'm telling my LinearLayout inside the ScrollView to fill_parent, but it's not, it's wrapping content.


Can you post your XML? Are you putting each ImageView in a separate LinearLayout or what? Just put all your ImageViews inside a vertical LinearLayout, and add:

android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

to all of them. That should do the trick.

EDIT: Wait, I'm confused. What are you trying to accomplish? Do you have a fixed size for your ScrollView?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜