0
我已创建两个单选按钮:Java的Android的 - 单选按钮没有显示
- 首先,蓝牙
- 其次,RS232
但我的应用程序只显示其中之一。
这是我的代码:
final RadioButton Bluetooth = new RadioButton(this);
Bluetooth.setId(TEXT_ID);
alertDialogBuilder.setView(Bluetooth);
Bluetooth.setText("Bluetooth");
Bluetooth.setTextSize(20);
final RadioButton RS232 = new RadioButton(this);
RS232.setId(TEXT_ID);
alertDialogBuilder.setView(RS232);
RS232.setText("RS232");
RS232.setTextSize(20);
请同时分享您的布局xml! – KostasC
对不起,但我没有XML。目标是在alertdialog中添加两个RadioButton。当用户点击项目菜单时,会显示alertdialog。 – McNavy