RelativeLayout does not display all buttons

Can't I put all my buttons on the screen? Is the last line and a half buttons disconnected from the screen? The final layout looks a little different. I created custom buttons, and for most buttons there are additional functions, but I simplified the code to eliminate all possible errors that are not directly related to my problem. I would like the buttons to fill and stay on the screen (I would post a photo of my layout, but my reputation is too low)

RelativeLayout

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MainLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <EditText
        android:id="@+id/result"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="none" />

    <ImageView
        android:id="@+id/sample"
        android:layout_below="@+id/result"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:contentDescription="@string/contentDescriptionImageView"
        android:scaleType="centerInside"
        android:src="@drawable/sample" />

    <Button
        android:id="@+id/b11"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/sample"
        android:layout_margin="0dp"
        android:text="@string/b11" />

    //...buttons

    <Button
        android:id="@+id/b95"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_below="@+id/b85"
        android:layout_margin="0dp"
        android:layout_toRightOf="@+id/b94"
        android:text="@string/b95" />

</RelativeLayout>

LinearLayout (LinearLayout + GridLayout)

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:grid="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/linearLayoutH1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:weightSum="1.0"
        android:orientation="vertical" >

        <EditText
            android:id="@+id/result"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="none" />

        <ImageView
            android:id="@+id/sample"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:contentDescription="@string/contentDescriptionImageView"
            android:scaleType="centerInside"
            android:src="@drawable/sample" />
    </LinearLayout>

    <GridLayout
        android:id="@+id/GridLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:columnCount="5"
        android:rowCount="9"
        android:useDefaultMargins="false" >

        <Button
            android:id="@+id/b11"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="0dp"
            android:text="@string/b11" />

        //...buttons are the same, I just erased the following RelativeLayout attributes:
-android:layout_below
-android:layout_toRightOf
-android:layout_alignParentBottom

        <Button
            android:id="@+id/b95"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="0dp"
            android:text="@string/b95" />

    </GridLayout>

</LinearLayout>

http://postimg.org/image/wvcl7rfer/eeef02dd/

Here's a solution that worked for me (I haven't tried GridView or TableLayout) This is one from BrOtherSOul. Here is my code:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
    android:orientation="vertical" >

<EditText
    android:id="@+id/result"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="none" />

<ImageView
    android:id="@+id/sample"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:contentDescription="@string/contentDescriptionImageView"
    android:scaleType="centerInside"
    android:src="@drawable/sample" />

<LinearLayout
    android:id="@+id/linearLayoutH3"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b11"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b11" />

    <Button
        android:id="@+id/b12"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b12" />

    <Button
        android:id="@+id/b13"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b13" />

    <Button
        android:id="@+id/b14"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b14" />

    <Button
        android:id="@+id/b15"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b15" />


</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH5"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b21"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b21" />

    <Button
        android:id="@+id/b22"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b22" />

    <Button
        android:id="@+id/b23"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b23" />

    <Button
        android:id="@+id/b24"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b24" />

    <Button
        android:id="@+id/b25"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b25" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH7"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b31"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b31" />

    <Button
        android:id="@+id/b32"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b32" />

    <Button
        android:id="@+id/b33"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b33" />

    <Button
        android:id="@+id/b34"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b34" />

    <Button
        android:id="@+id/b35"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b35" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH9"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b41"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b41" />

    <Button
        android:id="@+id/b42"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b42" />

    <Button
        android:id="@+id/b43"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b43" />

    <Button
        android:id="@+id/b44"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b44" />

    <Button
        android:id="@+id/b45"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b45" />


</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH11"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b51"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b51" />

    <Button
        android:id="@+id/b52"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b52" />

    <Button
        android:id="@+id/b53"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b53" />

    <Button
        android:id="@+id/b54"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b54" />

    <Button
        android:id="@+id/b55"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b55" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH13"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b61"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b61" />

    <Button
        android:id="@+id/b62"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b62" />

    <Button
        android:id="@+id/b63"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b63" />

    <Button
        android:id="@+id/b64"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b64" />

    <Button
        android:id="@+id/b65"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b65" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH15"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b71"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b71" />

    <Button
        android:id="@+id/b72"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b72" />

    <Button
        android:id="@+id/b73"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b73" />

    <Button
        android:id="@+id/b74"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b74" />

    <Button
        android:id="@+id/b75"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b75" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH17"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b81"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b81" />

    <Button
        android:id="@+id/b82"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b82" />

    <Button
        android:id="@+id/b83"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b83" />

    <Button
        android:id="@+id/b84"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b84" />

    <Button
        android:id="@+id/b85"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b85" />

</LinearLayout>

<LinearLayout
    android:id="@+id/linearLayoutH19"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <Button
        android:id="@+id/b91"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b91" />

    <Button
        android:id="@+id/b92"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b92" />

    <Button
        android:id="@+id/b93"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b93" />

    <Button
        android:id="@+id/b94"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b94" />

    <Button
        android:id="@+id/b95"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="0dp"
        android:text="@string/b95" />

</LinearLayout>

</LinearLayout>

http://postimg.org/image/ltromjjpp/5ad91d61/

+4
7

GridLayout . , . GridLayout , , . GridLayout LinearLayout , LinearLayout. , , ... ( ) , . ( )

:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/MainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<EditText
    android:id="@+id/result"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="none" />

<ImageView
    android:id="@+id/sample"
    android:layout_below="@+id/result"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:contentDescription="@string/contentDescriptionImageView"
    android:scaleType="centerInside"
    android:src="@drawable/sample" />

<LinearLayout
    android:id="@+id/1stRow"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

 //.... Your buttons

<LinearLayout
    android:id="@+id/2ndRow"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

 //.... Buttons again

<LinearLayout
    android:id="@+id/LastRow"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

</LinearLayout>

, :)

+1

dude

        <ScrollView
               xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent"
               android:layout_height="fill_parent">
            <RelativeLayout
             android:id="@+id/MainLayout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content" >

        // here u can add your all button or edit text or whatever u want to add just add 

        </ RelativeLayout>
        </ScrollView>
0

,

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:id="@+id/MainLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <EditText
            android:id="@+id/result"
            style="@style/ButtonTextWhite"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="none" />

        <ImageView
            android:id="@+id/sample"
            style="@style/ButtonTextWhite"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/result"
            android:contentDescription="@string/contentDescriptionImageView"
            android:scaleType="centerInside"
            android:src="@drawable/sample" />

        <Button
            android:id="@+id/b11"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/sample"
            android:layout_margin="0dp"
            android:text="@string/b11" />

        <Button
            android:id="@+id/b12"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/sample"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b11"
            android:text="@string/b12" />

        <Button
            android:id="@+id/b13"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/sample"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b12"
            android:text="@string/b13" />

        <Button
            android:id="@+id/b14"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/sample"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b13"
            android:text="@string/b14" />

        <Button
            android:id="@+id/b15"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/sample"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b14"
            android:text="@string/b15" />

        <Button
            android:id="@+id/b21"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b11"
            android:layout_margin="0dp"
            android:text="@string/b21" />

        <Button
            android:id="@+id/b22"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b12"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b21"
            android:text="@string/b22" />

        <Button
            android:id="@+id/b23"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b13"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b22"
            android:text="@string/b23" />

        <Button
            android:id="@+id/b24"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b14"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b23"
            android:text="@string/b24" />

        <Button
            android:id="@+id/b25"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b15"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b24"
            android:text="@string/b25" />

        <Button
            android:id="@+id/b31"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b21"
            android:layout_margin="0dp"
            android:text="@string/b31" />

        <Button
            android:id="@+id/b32"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b22"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b31"
            android:text="@string/b32" />

        <Button
            android:id="@+id/b33"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b23"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b32"
            android:text="@string/b33" />

        <Button
            android:id="@+id/b34"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b24"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b33"
            android:text="@string/b34" />

        <Button
            android:id="@+id/b35"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b25"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b34"
            android:text="@string/b35" />

        <Button
            android:id="@+id/b41"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b31"
            android:layout_margin="0dp"
            android:text="@string/b41" />

        <Button
            android:id="@+id/b42"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b32"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b41"
            android:text="@string/b42" />

        <Button
            android:id="@+id/b43"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b33"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b42"
            android:text="@string/b43" />

        <Button
            android:id="@+id/b44"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b34"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b43"
            android:text="@string/b44" />

        <Button
            android:id="@+id/b45"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b35"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b44"
            android:text="@string/b45" />

        <Button
            android:id="@+id/b51"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b41"
            android:layout_margin="0dp"
            android:text="@string/b51" />

        <Button
            android:id="@+id/b52"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b42"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b51"
            android:text="@string/b52" />

        <Button
            android:id="@+id/b53"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b43"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b52"
            android:text="@string/b53" />

        <Button
            android:id="@+id/b54"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b44"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b53"
            android:text="@string/b54" />

        <Button
            android:id="@+id/b55"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b45"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b54"
            android:text="@string/b55" />

        <Button
            android:id="@+id/b61"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b51"
            android:layout_margin="0dp"
            android:text="@string/b61" />

        <Button
            android:id="@+id/b62"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b52"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b61"
            android:text="@string/b62" />

        <Button
            android:id="@+id/b63"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b53"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b62"
            android:text="@string/b63" />

        <Button
            android:id="@+id/b64"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b54"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b63"
            android:text="@string/b64" />

        <Button
            android:id="@+id/b65"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b55"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b64"
            android:text="@string/b65" />

        <Button
            android:id="@+id/b71"
            style="@style/ButtonTextWhite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b61"
            android:layout_margin="0dp"
            android:text="@string/b71" />

        <Button
            android:id="@+id/b72"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b62"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b71"
            android:text="@string/b72" />

        <Button
            android:id="@+id/b73"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b63"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b72"
            android:text="@string/b73" />

        <Button
            android:id="@+id/b74"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b64"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b73"
            android:text="@string/b74" />

        <Button
            android:id="@+id/b75"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b65"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b74"
            android:text="@string/b75" />

        <Button
            android:id="@+id/b81"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b71"
            android:layout_margin="0dp"
            android:text="@string/b81" />

        <Button
            android:id="@+id/b82"
            style="@style/ButtonTextBlack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b72"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b81"
            android:text="@string/b82" />

        <Button
            android:id="@+id/b83"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b73"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b82"
            android:text="@string/b83" />

        <Button
            android:id="@+id/b84"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b74"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b83"
            android:text="@string/b84" />

        <Button
            android:id="@+id/b85"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/b75"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b84"
            android:text="@string/b85" />

        <Button
            android:id="@+id/b91"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/b81"
            android:layout_margin="0dp"
            android:text="@string/b91" />

        <Button
            android:id="@+id/b92"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/b82"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b91"
            android:text="@string/b92" />

        <Button
            android:id="@+id/b93"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/b83"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b92"
            android:text="@string/b93" />

        <Button
            android:id="@+id/b94"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/b84"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b93"
            android:text="@string/b94" />

        <Button
            android:id="@+id/b95"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/b85"
            android:layout_margin="0dp"
            android:layout_toRightOf="@+id/b94"
            android:text="@string/b95" />
    </RelativeLayout>

</ScrollView>
0

linearlayout , .

<linearlayout

orientation=horizantal>
<button1>
<button2>
<button3>

</linearlayout>

...

0

0

ScrollView.

0

:

XML. , dynamically GridView

: Xml, ScrollView

 <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:id="@+id/MainLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
            // Your buttons

    </RelativeLayout>

</ScrollView>
0

Source: https://habr.com/ru/post/1531550/


All Articles