Code example for TableRow

Methods: getChildAt, getChildCount

0
        setChildrenOnClickListener((TableRow)child);
    } 
 
 
    private void setChildrenOnClickListener(TableRow tr) {
        final int c = tr.getChildCount();
        for (int i=0; i < c; i++) {
            final View v = tr.getChildAt(i);
            if ( v instanceof RadioButton ) {
                v.setOnClickListener(this);
            } 
        } 
    } 
 
    public int getCheckedRadioButtonId() { 
        if ( activeRadioButton != null ) {
            return activeRadioButton.getId();
        } 
 
        return -1; 
    }