File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes How to stop handler or thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "How to stop handler or thread " Watch "How to stop handler or thread " New topic
Author

How to stop handler or thread

tawisak ruksuwan
Greenhorn

Joined: Jun 24, 2011
Posts: 3
My program is random string
First i press button for start and then it will random
Second i press same button again for it stop how can i do??

my code



this is XML

This is array.xml insert in to folder values

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5778
    
    7

tawisak, welcome to Java Ranch!

Why do you want to press a button twice? Why not just press the button once and then display a random sentence?


JBoss In Action
tawisak ruksuwan
Greenhorn

Joined: Jun 24, 2011
Posts: 3
because i want to start random and stop it same button. How can i do it
 
wood burning stoves
 
subject: How to stop handler or thread
 
Similar Threads
Need Help on the scrolling Bar in Android?
my first activity runing happen error:Uncaught handler: thread main exiting due to uncaught exceptio
How to get View from customised ListView?
how to add a scrollbar to a view
nullpointer when i try to initiate onclicklistener