Android java activities problem

Put your problem here if it does not fit any of the other categories.

Android java activities problem

Postby MakyOnCover » Tue Jul 31, 2012 7:26 pm

I have this two methods, and I what to put in pause this main activity when "something1*" happens and then change to someactivity1* while the main activity is paused. But my problem is that it doesn't change my activity, it freezes my main activity and it doesn't do anything else. It's probabli because I destroyed the thread but I can't see any solution and I'm not sure. (The method2 is inside a loop)
sorry for my english and thanks for the help

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void method1(){
  2. super.onPause();
  3. run = false;
  4. while(){
  5. try{
  6. thread.join();
  7. }catch(InterruptedException e){
  8. e.printStackTrace();
  9. }
  10. }
  11. thread1 = null;
  12.  
  13. Intent i = new Intent(someactivity1*);
  14. startActivity(i);
  15.  
  16. }
  17.  
  18. //the method2 is inside a loop
  19. public void method2(){
  20. if(something1*){
  21. onPause();
  22. }
  23. }
  24.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
MakyOnCover
Junior Developer
Junior Developer
 
Posts: 19
Joined: Sat Dec 31, 2011 7:49 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 22 guests