0

I'm playing around with Android development and am following this basic tutorial. I have produced my first Android app (code is in this repo) and am having an issue controlling its UI/widget layout at runtime.

Even though activity_main.xml shows (in the UI Designer) the "DO IT!" button as appearing to the right of the EditText view/widget:

enter image description here

Come showtime on the emulator, the button is rendered on top of the EditText:

enter image description here

Any idea as to why and what I can do so that the button appears to the right of the textfield/EditText at runtime (inside the emulator)?

smeeb
  • 27,777
  • 57
  • 250
  • 447

1 Answers1

2

you can not use

tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp"

that is only for the layout editor. Check my answer to this question:

Buttons not in place

hope it helps

Ernesto Ulloa
  • 482
  • 3
  • 13