代码B是一个带有RadioButton的自定义RadioButton。我希望得到当前选定的RadioButton索引,所以我在代码A中添加了一个属性mySelectedIndex,但是在第一次调用它之后mySelectedIndex不会改变。private lateinit var selectedIndex= mCustomAdapter.getSelectedIndex() will not work too!lateinit var mCustomAdapter: CustomAdapter
priv
现在我有了一个MyScreen,它从包含一个按钮的MainScreen扩展而来。当按钮单击时,它将显示包含PopupScreen列表的RadioButtonFields、OK和Cancel按钮。我的问题是如何将RadioButtonField值从PopupScreen返回到MyScreen。MyScreen.java private int currentValue