I am using ConstraintLayout
in my application to make applications layout. I am trying to a create a screen wheren one EditText
and Button
You can center a view as a percentage of the screen size.
This example uses 50% of width and height:
This was done using ConstraintLayout version 1.1.3. Don't forget to add it to your dependencies in the gradle, and increase the version if there is a new version out there:
dependencies {
...
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}