简体   繁体   中英

How to constraint a view to overlap another view in RelativeLayout

I am overlapping an ImageView on top of a View in a RelativeLayout.

something like this:

在此处输入图片说明 1

Where the middle white circle(ImageView) is overlapping the white vertical border(View).

But for some reason I am not managing to constraint the circle above the z position of the white border. and if the border moves say to the right side of the screen, I want the circle to move there too. but instead the circle always remains in the center regardless to the position of the border. How do I this in a RelativeLayout?

TIA

You can make like:
AlignLeftOf the border

Then code: circle.translationX( circle_width/2)
(and a bit of justification, it should be good)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM