In Android, Studio shot a debug.ap file, but the button and text fields in it are not in their places, but in the upper left corner of each other. Although in the constructor IDE everything is displayed correctly and CML files seem to have the correct fields. Explain why this could be? Thank you in advance!!!

введите сю <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.alexerjavagmail.mycalc.MainActivityCalc"> <EditText android:id="@+id/Num1" android:layout_width="218dp" android:layout_height="53dp" android:ems="10" android:hint="первое число" android:inputType="number" tools:layout_editor_absoluteX="33dp" tools:layout_editor_absoluteY="182dp" /> <EditText android:id="@+id/Num2" android:layout_width="209dp" android:layout_height="50dp" android:ems="10" android:hint="второе число" android:inputType="number" tools:layout_editor_absoluteX="37dp" tools:layout_editor_absoluteY="288dp" /> <TextView android:id="@+id``/result" android:layout_width="215dp" android:layout_height="51dp" android:text=" 0 " tools:layout_editor_absoluteX="33dp" tools:layout_editor_absoluteY="79dp" /> <Button android:id="@+id/button" android:layout_width="50dp" android:layout_height="50dp" android:onClick="onButtonClick" android:text="Button" tools:layout_editor_absoluteX="73dp" tools:layout_editor_absoluteY="397dp" /> </android.support.constraint.ConstraintLayout>да код 
  • Spreading widgets around the screen in the IDE is not enough for everything to work. Then they need to be connected to each other and the edges of the screen, set up the components between them, which will indicate exactly how the widgets are located relative to each other and the edges of the screen. See this answer as an example and at the end there are links on how to work with this container correctly to get the expected result - pavlofff

0