📜  如何从 android 中的广播组获取数据 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:10.863000             🧑  作者: Mango

代码示例1
// get selected radio button from radioGroup
            int selectedId = radioGroup.getCheckedRadioButtonId();

            // find the radiobutton by returned id
            radioButton = (RadioButton) findViewById(selectedId);

            Toast.makeText(MyAndroidAppActivity.this,
                radioButton.getText(), Toast.LENGTH_SHORT).show();