If you want to do it this way:
I have two solutions, one with Linear another with relative layour, follows the Linear, in it I created other layouts inside, one with vertical orientation to put the Edit text , and another horizontal to separate this layout from the Edit text with the button by Weight.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:digits="1234567890.,"
android:ems="10"
android:id="@+id/editTextComercial"
android:hint="Diametro Comercial"
android:maxLines="1" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:inputType="numberDecimal"
android:digits="1234567890.,"
android:ems="10"
android:id="@+id/editTextVC"
android:hint="Velocidade de Corte"
android:maxLines="1" />
</LinearLayout>
<Button
android:text="Calcular "
android:layout_marginTop="5dp"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/buttonCalc"
android:layout_weight="2"
/>
</LinearLayout>
<TextView
android:text="TextView"
android:visibility="invisible"
android:gravity="center"
android:textSize="16dp"
android:textStyle="bold"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textViewResultRPM" />
In relative layout it was a little more complicated, however the solution is simpler, just add: android:layout_toEndOf="@id/editTextComercial"
android:layout_alignBottom="@id/editTextVC"
to be able to align the button at the end of the width and bottom of Edit text , of course a value should be added in the width of Edit text.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="250dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:digits="1234567890.,"
android:ems="10"
android:id="@+id/editTextComercial"
android:hint="Diametro Comercial"
android:maxLines="1"
android:layout_marginTop="10dp"
android:layout_alignParentStart="true" />
<TextView
android:text="TextView"
android:visibility="invisible"
android:gravity="center"
android:textSize="16dp"
android:textStyle="bold"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:id="@+id/textViewResultRPM"
android:layout_below="@+id/editTextVC"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="250dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:digits="1234567890.,"
android:ems="10"
android:id="@+id/editTextVC"
android:hint="Velocidade de Corte"
android:maxLines="1"
android:layout_below="@+id/editTextComercial"
android:layout_alignParentStart="true" />
<Button
android:text="Calcular "
android:layout_height="wrap_content"
android:id="@+id/buttonCalc"
android:layout_width="match_parent"
android:layout_toEndOf="@id/editTextComercial"
android:layout_alignBottom="@id/editTextVC"
android:layout_alignTop="@+id/editTextComercial" />
Use Linearlayout
– viana