I am working on a form layout for a Login Activity
in my Android App. The image below is how I want it to look like:
Since PercentRelativeLayout was deprecated in 26.0.0 and nested layouts like LinearLayout inside RelativeLayout have a negative impact on performance (Understanding the performance benefits of ConstraintLayout) the best option for you to achieve percentage width is to replace your RelativeLayout with ConstraintLayout.
This can be solved in two ways.
SOLUTION #1 Using guidelines with percentage offset
SOLUTION #2 Using chain with weighted width for EditText
In both cases, you get something like this