Is it posible to avoid inherit view measurements in ConstraintLayout? I mean I have one Activity displaying a toolbar and a Frame container to display Fragments. This fragment is vertically and horizontally centred but when adding toolbar everything moves down.
So.. Is there any way to achieve this?
It depends on the parent Container. You can use
or other relative type layouts, but you can't use LinearLayout as that won't allow you to move children into other sections of the LinearLayout.
Next for the Parent Activity you need to make sure that you are not putting the FrameLayout beneath the Toolbar if you intend to allow yourself to build constraints off the parent boundaries. Your parent is the FrameLayout, so if it is already pushed down beneath the Toolbar you won't be able to bind to it's parent unless you get parent.parent for your binding.
So you have a few options.
If you need more help, then share your XML so I can help point out where you can make adjustments.
Happy Coding!