How can I stop a background thread on keyboard flip in android?
            Asked
            
        
        
            Active
            
        
            Viewed 978 times
        
    1
            
            
        - 
                    How about some details, code sample, etc? – Bostone Oct 24 '09 at 06:09
- 
                    I would like to either wait for a background thread execution to finish before activity is recreated on keyboard slide in/out or kill the thread itself so that i can start the thread afresh on orientation change. For example: If you search for a word in the android market application and scroll down, flip the keyboard while the files are being loaded, notice that the layout does not change until the results are displayed. I want to achieve similar behavior. – random Oct 25 '09 at 05:30
1 Answers
0
            When the keyboard flip occurs, the current activity is killed and restarted in the new orientation.  So I would imagine you would want to stop the thread on the onPause() or onDestroy() method.
The following StackOverflow question might be relevant: Activity restart on rotation Android
 
     
    