how to get chlidren

I got this code and I want to add GET-CHILD method ( please help me)

public class MainActivity extends AppCompatActivity {
private Button buttons;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // setContentView( R.layout.activity_main );
    buildGuiByCode();
}

public void buildGuiByCode() {
    // Get width of the screen
    Point size = new Point();
    getWindowManager().getDefaultDisplay().getSize(size);
    int w = size.x / TicTacToe.SIDE;

    // Create the layout manager as a GridLayout
    GridLayout gridLayout = new GridLayout(this);
    gridLayout.setColumnCount(TicTacToe.SIDE);
    gridLayout.setRowCount(TicTacToe.SIDE);

    // Create the buttons and add them to gridLayout
    for (int row = 0; row < TicTacToe.SIDE; row++) {
        for (int col = 0; col < TicTacToe.SIDE; col++) {
            Button b= new Button(this);
            gridLayout.addView(b, w, w);
            b.setTextSize((int)( w *.2));
            b.setOnClickListener(new ButtonHandier(b, row, col));
        }
    }

    // Set gridLayout as the View of this Activity
    setContentView(gridLayout);
}

    public void update (Button buttonClicked,int row, int col){
    Log.w("MainActivity", "inside update:" + buttonClicked);
    buttonClicked.setText("X");
}

private class ButtonHandier implements View.OnClickListener {
    private Button myButton;
    private int row, col;

private ButtonHandier(Button myButton, int row, int col) {
    this.myButton = myButton;
    this.row = row;
    this.col = col;
    }

    @Override
    public void onClick(View view) {
        update(myButton, row, col);

    }
}

}

To get children of say, a cube transform:

var i: int = 0;
var xparent : Transform;

 function Start ()  {

for (var child : Transform in xparent) {i++;}
i = i-1;
        Debug.Log("number of children in cube: " + i);
    }

[101874-children-in-cube.zip|101874]