开发者

android app: aligning imageviewS in center horizontally

So I'm messing with imageviews and I am able to align a singl开发者_运维技巧e imageview in the center horizontally with the following code:

android:layout_centerHorizontal="true"

Now my main problem is that I have X imageviews and when I align them all like that and then use the android:layout_toRightOf="", they just start from the middle.

What to do?


Wrap them in a horizontal LinearLayout that is centred in your RelativeLayout


a fast solution you will align the first to the left then the next imageviews toRightOf= (delete android:layout_centerHorizontal="true" from your layout)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜