Android button alignment tutorial


In this tutorial you will learn more about Android button alignment and how you can alignment android button in the same line by using either Android LinearLayout or Android RelativeLayout.

Social media:



  1. Guys I have a relative layout and when I'm dragging the buttons inside it I have no such indications with the alignment lines and the align parrent etc messages. I'm trying to find the setting for this but I haven't yet. Can anybody help?

  2. Hello, what version of Android Studio are you using?
    I am using 3.5 and the Layout menu does not contain a Relative Layout.
    Thanks in advanced!

  3. Hello. İ have a question. İ have a few buttons with Sound. But i click a button and when i click a second button. They playing together. First one dont stop. İ want that. When i click a random button others must to be stop. How can i do it?

  4. after android studio update..those alignment lines that help u put stuff in centre are missing….is there any way to enable them back on?

  5. I'm not a developer, just a user. My Note 4 Android tapping recently went out of alignment. IOW, when I tap on an icon, the one below it opens instead. When I try to type a message I have to tap about an inch above & a quarter inch to the left of the letter I want to type to get that letter to appear. I've tried rooting the phone but didn't help. It even occurs during TWRP recovery mode (which is before it boots up to the main screen). Something's hosed, huh. Any ideas would be appreciated, TIA!

  6. Soory but I did as you say, but although the butten apeares correctly on the relatively layout on the emulator is still placed only on the top left.


Please enter your comment!
Please enter your name here