Screen becomes disorganized when executing [duplicate]

-4

I'm having a problem, I'm starting on the android programming!

It had already started a while and stopped for the same reason I'm having now: my computer is not very good and kinda does not accept the Android Studio Emulator. So I opted to use my cell phone as an emulator.

So far so good, but I do everything right in Android Studio and Previewer there shows that centralized study and everything is correct, but when Emulo is this way below.

Could anyone explain or give me a hint of what it is?

 

<TextViewandroid:id="@+id/textView" 
    android:layout_width="279dp" 
    android:layout_height="61dp" 
    android:gravity="center" 
    android:text="@string/cabecalhot_texto" 
    android:textSize="24sp" 
    tools:layout_editor_absoluteX="53dp" 
    tools:layout_editor_absoluteY="57dp" /> 

<Button 
    android:id="@+id/botaoiniciarid" 
    android:layout_width="368dp" 
    android:layout_height="48dp" 
    android:gravity="center" 
    android:text="@string/botao_iniciar" 
    tools:layout_editor_absoluteX="8dp" 
    tools:layout_editor_absoluteY="268dp" /> 

<TextView 
    android:id="@+id/resultadoid" 
    android:layout_width="368dp" 
    android:layout_height="35dp" 
    android:gravity="center" 
    android:text="@string/texto_numero" 
    android:textSize="18sp" 
    tools:layout_editor_absoluteX="0dp" 
    tools:layout_editor_absoluteY="415dp" /> 

    
asked by anonymous 11.07.2018 / 07:31

1 answer

0

You have to tell each view its position relative to another view, for example if in the Button you add the android attribute: layout_below="@ id / textView", you are telling Button "to be below the textView id view ".

see this site! link

    
13.07.2018 / 18:40