I click Menu icon on Main activity:
- Button1 opens Activity2(Webview1), the Back button takes me back to Main activity.
- Button 2 makes Searchview1 visible in Main activity.
The following Sub enables the Back button to do Searchview1. Visible=False and Main stays active.
Pressing Back again closes everything as expected.
Would someone tell me what is causing a 'Not all code paths return a value'.
I've read https://www.b4x.com/android/forum/t...ctivity-and-get-a-return-value.84804/#content and still need more to read.
Thanks
- Button1 opens Activity2(Webview1), the Back button takes me back to Main activity.
- Button 2 makes Searchview1 visible in Main activity.
The following Sub enables the Back button to do Searchview1. Visible=False and Main stays active.
B4X:
Sub Activity_KeyPress (key As Int) As Boolean
If key = KeyCodes.KEYCODE_BACK Then
If Searchview1. Visible=True Then
Searchview1.Visible=False
Panel1.Visible=True
Return True
Else
Return False
End If
End If
End Sub
Would someone tell me what is causing a 'Not all code paths return a value'.
I've read https://www.b4x.com/android/forum/t...ctivity-and-get-a-return-value.84804/#content and still need more to read.
Thanks