How to make my buttons responsive?

Hello! I'm developing a simple game and I need my buttons to stay the same on all smarhptones, otherwise it only will work on one specific smarthpone.

This is the code for the layout:

<?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:p1="http://schemas.android.com/apk/res/android" p1:layout_width="match_parent" p1:layout_height="match_parent" p1:id="@+id/gridLayout1" p1:background="@drawable/fracao" p1:columnCount="3" p1:orientation="vertical" p1:rowCount="1" p1:useDefaultMargins="true"> <Button p1:text="LEFT" p1:id="@+id/button1" p1:height="150dp" p1:width="150dp" p1:layout_marginLeft="120dp" p1:layout_marginTop="1030dp" /> <Button p1:text="CENTER" p1:id="@+id/button2" p1:height="150dp" p1:width="150dp" p1:layout_marginLeft="50dp" p1:layout_marginTop="1030dp" /> <Button p1:text="RIGHT" p1:id="@+id/button3" p1:height="150dp" p1:width="150dp" p1:layout_marginLeft="54dp" p1:layout_marginTop="1030dp" /> </GridLayout>

This is the Screen

Please, help me!

Sign In or Register to comment.