get Radio Text - Android User Interface

Android examples for User Interface:RadioButton

Description

get Radio Text

Demo Code


//package com.java2s;
import android.view.View;
import android.widget.RadioButton;

public class Main {
    public static String getRadioText(View rootView, int radioCheckedId) {
        RadioButton selectedRadio = (RadioButton) rootView
                .findViewById(radioCheckedId);
        String radioMaterialText = selectedRadio.getText().toString();
        return radioMaterialText;
    }/*from w w w  .jav  a2 s.  c  om*/
}

Related Tutorials