Reputation: 187
In my Android app, I am using a RelativeLayout
to custom one of my Activity
s.
I have a square ImageView
that I want to set precisely. In other words, I want its right border to touch the horizontal center of the layout.
Is such a thing possible without doing weird things such as centering and then marging?
Upvotes: 1
Views: 35
Reputation: 705
It's not a perfect solution but potentially you could use: android:layout_marginRight="xdp" Where x is half of your screen width + half the width of your imageView? I know it's not perfect but might help until some guru comes along
Upvotes: 2