感谢您帮助我。
在ViewPager + Fragment中包含四个页面,包括Fragment包含listview里面的listview按钮,listview自带的click事件也需要使用。在按钮单击事件的列表视图项中,触发器不正确。有时单击无响应,但在交换机片段中单击事件响应和片段切换成功
按钮由于
说明
Private Sub Arr(ByVal arrRad() As RadioButton, ByVal arrLbl() As Label) Dim result As Integer = 0 Dim temp As Integer = 0 'arrRad is my control array Radiobutton, arrLbl is my control array Label 'I have 15 Radiobutton and 3 Label For i As Integer = 0 To arrRad.Length - 1 Step 5 If arrRad(i).Checked = True Then temp = arrRad(i).Text.Substring(0, 1) ElseIf arrRad(i + 1).Checked = True Then temp = arrRad(i + 1).Text.Substring(0, 1) ElseIf arrRad(i + 2).Checked = True Then temp = arrRad(i + 2).Text.Substring(0, 1) ElseIf arrRad(i + 3).Checked = True Then temp = arrRad(i + 3).Text.Substring(0, 1) ElseIf arrRad(i + 4).Checked = True Then temp = arrRad(i + 4).Text.Substring(0, 1) Else temp = 0 End If result += temp Next txtKetQua.Text = result.ToString() End Sub
答案 0 :(得分:0)
将新的OnClickListener()更改为新的View.OnClickListener()