TL;DR The view width must be exactly half of the screen, and be centered. Using ConstraintLayout.
ConstraintLayout
Note that the view does not have
With ConstraintLayout, you can center a view in the screen like this:
Update your gradle to the last version of ConstraintLayout:
dependencies { ... implementation 'com.android.support.constraint:constraint-layout:1.1.3' }