title: In Android Studio, how to use GridView to display a matrix of Text Boxes?
body: <p>I am working on a project that involves telling a user to input what size they want a matrix to be, by using a dropdown Spinner and then press submit, and then there will be a new Activity displaying a matrix of Text Boxes of the dimension(size) the user selected.</p>
  
  <p>I find this task to be quite tricky, given that this is my very first Android Studio project and I am still a novice at it.</p> 
  
  <p>The picture below tells the user what dimension they want the matrices to have.</p>
  
  <p><a href="https://i.stack.imgur.com/AtC2d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AtC2d.png" alt="enter image description here"></a></p>
  
  <p>Here is the XML code for the Activity that will appear after the user selects a dimension:</p>
  
  <pre><code>       &lt;RelativeLayout
              android:layout_width="368dp"
              android:layout_height="495dp"
              tools:layout_editor_absoluteX="8dp"
              tools:layout_editor_absoluteY="8dp"&gt;
  
              &lt;TextView
                  android:id="@+id/textView10"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:layout_alignParentTop="true"
                  android:layout_marginLeft="15dp"
                  android:layout_marginStart="15dp"
                  android:text="Please input the numbers on both matrices." /&gt;
  
              &lt;TextView
                  android:id="@+id/textView11"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView10"
                  android:layout_alignStart="@+id/textView10"
                  android:layout_below="@+id/textView10"
                  android:layout_marginTop="21dp"
                  android:text="Matrix1: "
                  android:textStyle="bold" /&gt;
  
             &lt;GridView
                  android:layout_width="match_parent"
                  android:layout_height="200dp"
                  android:layout_alignParentEnd="true"
                  android:layout_alignParentRight="true"
                  android:layout_below="@+id/textView11" /&gt;
  
         &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is the code that uses the dimensions from the dropdown Spinners:</p>
  
  <pre><code>public void submitButton(View view)
  {
      //get the dimensions
      Integer rows = (Integer) matrix1Rows.getSelectedItem();
      Integer columns = (Integer) matrix1Columns.getSelectedItem();
  
      Intent intent = new Intent(this, TwoMatricesDimensionSubmitActivity.class);
          startActivity(intent);
  
  }
  </code></pre>
  
  <p>For the TwoMatricesDimensionSubmitActivity, I want it to display a GridView that displays a matrix of text boxes with a dimension size that the user selected, but I couldn't figure out how to put the values of rows and columns into the XML of the next Activity nor do I know how do use a GridView.   </p>