Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

import android.widget.RadioButton;

public class Main {
    /**
     * 
     * @param args
     * @param val
     * @param rb
     */
    public static void setSelectedRadioButton(String args, String[] val, RadioButton[] rb) {
        try {
            if (val.length == rb.length) {
                for (int i = 0; i < val.length; i++) {
                    if (args.equalsIgnoreCase(val[i])) {
                        rb[i].setChecked(true);
                    }
                }
            }
        } catch (Exception e) {
            Log.e("ZambelzUtility", "setSelectedRadioButton : " + e.getMessage());
        }
    }
}