Okay I have a text view that changed every time a user types in an answer or response. I dont want the computers response to appear automatically but maybe pause for 3 to 5 seconds with a prograss dialog, or something to show its processing data, when its really not. What would i implement in my code to do this. Any help would be great. Thanks
            Asked
            
        
        
            Active
            
        
            Viewed 795 times
        
    1
            
            
        - 
                    2It sounds like you're just wasting the user's time. Why? – Matt Ball Jun 20 '11 at 14:45
- 
                    1To look like a badass software company with 'heavy' apps. – Jun 20 '11 at 14:47
3 Answers
1
            
            
        for this I would create a timer that will disable the text view after they have finished doing what they want and then enable it again after x number of seconds. You could even create the timer with a random length of time between 3 and 5 seconds so it seems random.
http://developer.android.com/reference/java/util/Timer.html
Hope this helps.
 
    
    
        stuartmclark
        
- 1,203
- 13
- 22
- 
                    
- 
                    To help you guys better understand what im trying to do. Here is an example public void onCreate(){ – theITRanger22 Jun 20 '11 at 15:18
- 
                    To help you guys better understand what im trying to do. Here is an example public void onCreate(){ setContentView(r.layout.main) textView.setText("Welcome enter your name"); // The user enters there name in the EditText box respond.setOnClickListener(new View.OnClickListener){ //Once the user enters there name i would like it to pause and display a progress dialog before the next textView. I hope this makes more since what im trying to do. Thanks for Everyone help! } } – theITRanger22 Jun 20 '11 at 15:24
0
            
            
        You could use an AsyncTask within which you would call Thread.sleep(Random.nextInt(2)+3) in the doInBackground() method.  Within the AsyncTask class, you can show and hide the progress bar with the onPreExecute() and onPostExecute() methods.
 
    
    
        Haphazard
        
- 10,900
- 6
- 43
- 55
0
            
            
        Probably .. this solution Counting Chars in EditText Changed Listener invoking a thread for controlling progress dialog can solve your problem
 
    
    
        Community
        
- 1
- 1
 
    
    
        success_anil
        
- 3,659
- 3
- 27
- 31
- 
                    Okay thank!So im trying to implement the a handler for a postDeleay. After the button is clicked. Do you think this will work? – theITRanger22 Jun 20 '11 at 16:01
- 
                    
