Dear all the experts,
As refer to above, I currently have the problem due to user pressed back key during the program loading data into CustomListView from the website.
My program have a main and sub activities option forms. When user click on sub-activity option, it will download a list of data from website and load into CustomListView.
The activity screen will reload many times (depend on how many record to be loaded) when the user pressed back key while the list is still loading.
I had tried to place below code but the Activity will be re-created again. Is there any way to stop the loading activity thoroughly when the back key is pressed?
Any advices or suggestion is welcome and highly appreciated.
Thanks in advance.
As refer to above, I currently have the problem due to user pressed back key during the program loading data into CustomListView from the website.
My program have a main and sub activities option forms. When user click on sub-activity option, it will download a list of data from website and load into CustomListView.
The activity screen will reload many times (depend on how many record to be loaded) when the user pressed back key while the list is still loading.
I had tried to place below code but the Activity will be re-created again. Is there any way to stop the loading activity thoroughly when the back key is pressed?
Any advices or suggestion is welcome and highly appreciated.
Thanks in advance.
B4X:
Sub activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
Activity.Finish
End If
Return False
End Sub