I have been trying to keep the context menu when doing a long press / Click to stay on screen when the screen is rotated.
Searching around the net, the main answers found are not the best such as add configChanges into the android manifest or use the onRetainNonConfigurationInstance which is depreciated .
Currently I am handling my dialog boxes when on screen and a rotation occurs via savedInstanceState by having my own method to show them again by using a variable to be saved into the bundle and then retrieved.
However the context menu is slightly harder to do as it is registered against the listview I have and this links it together so it knows which row has been selected
I do also have a onitemlongclick method which works along side the contextmenu so I should be able to get the row information from there but it is then how to call it all back afterwards
Thanks
TimCS
Searching around the net, the main answers found are not the best such as add configChanges into the android manifest or use the onRetainNonConfigurationInstance which is depreciated .
Currently I am handling my dialog boxes when on screen and a rotation occurs via savedInstanceState by having my own method to show them again by using a variable to be saved into the bundle and then retrieved.
However the context menu is slightly harder to do as it is registered against the listview I have and this links it together so it knows which row has been selected
I do also have a onitemlongclick method which works along side the contextmenu so I should be able to get the row information from there but it is then how to call it all back afterwards
Thanks
TimCS