Screen gets disorganized when running

Asked

Viewed 152 times

-4

I’m having a problem, I’m starting on android programming!

I had already started a while ago and stopped for the same reason I’m having now: my computer is not very good and kind that does not accept the Emulator of Android Studio. So I chose to use my 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 gets this way below.

Could someone explain to me or give me a hint of anything?

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

<TextView 
    android: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" /> 

  • In order to know what may be wrong it is necessary to know the code that produces this screen.

  • You need to post Activity XML.

  • OK I just added the Code is something basic to understand why when I do the emulation appears this way! Thank you

  • Buddy, since you’re learning, start with Relative Layout. If you want to continue with this Layout then you will need to study a little more, because it is much more complicated and it is not only put things in the place that you think it will stay, it only works in Relative.

  • Do not put code as image, and the layout code in the text version is incomplete face to image.

  • When using Constraint-Layout you need to make links that serve as a positioning reference on the screen, as you have not made any markup, so the default was taken into account, which is to link directly to the parent object. This type of layout manager is really difficult to manipulate, I advise using Linear-layout, at least until you get the hang of it, tip from those who are also learning and have been through it.

  • I can not paste the code because I am new there prevents to use several Links

  • Plus, Thanks I’ll see if I can figure it out now with the tips ! ..

Show 3 more comments

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.