[android-beginners] Lunar Lander thread error after returning from an XML preferences activity
Hello, I have based my code upon the LunarLander example and added a preferences Activity launched from a menu item. The preferences get loaded and displayed correctly, but when I press the return button my app fails with an exception IllegaThreadState as it tries to start the thread again from within the following method: /* * Callback invoked when the Surface has been created and is ready to be * used. */ public void surfaceCreated(SurfaceHolder holder) { // start the thread here so that we don't busy-wait in run() // waiting for the surface to be created thread.setRunning(true); thread.start(); } I have tried to check if the thread is running with thread.isAlive() ==false but it appears that when the activity loses focus the thread returns false for that call. Any suggestions on what I could do to prevent such exception? I've tried try/catch but I am unsure on what to call on the exception. Any help much appreciated, Cass Surek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] ListView
Hi all! Is posible to remove/hide the ListView separator? thanks! -- Trimis de pe dispozitivul meu mobil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: ListView
Liviu Ungureanu wrote: Is posible to remove/hide the ListView separator? From http://wiki.andmob.org/faq-listsep - You can use the android:dividerHeight XML layout attribute to make the divider be 0px high. Or, you can use the android:divider XML layout attribute to make the divider be transparent (#). Either of those should have the effect of hiding the separator. The difference is that in the latter, the space taken up by the separator will still be there. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: ListView
Thank you! 2009/5/24, Mark Murphy mmur...@commonsware.com: Liviu Ungureanu wrote: Is posible to remove/hide the ListView separator? From http://wiki.andmob.org/faq-listsep - You can use the android:dividerHeight XML layout attribute to make the divider be 0px high. Or, you can use the android:divider XML layout attribute to make the divider be transparent (#). Either of those should have the effect of hiding the separator. The difference is that in the latter, the space taken up by the separator will still be there. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado -- Trimis de pe dispozitivul meu mobil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to save an xml file?
Hi! I have created the xml structure (using DOM) but i don't know how to save it on the phone.could someone help me please? Thank you. -- Trimis de pe dispozitivul meu mobil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Lunar Lander thread error after returning from an XML preferences activity
I had to delete the thread (setting it as null for the Garbage Collector) and create another, restarting it. I am avoiding the Exception, but now my animation is not resuming. Hope this helps someone. Cass On May 24, 10:59 am, Cass Surek cass.su...@gmail.com wrote: Hello, I have based my code upon the LunarLander example and added a preferences Activity launched from a menu item. The preferences get loaded and displayed correctly, but when I press the return button my app fails with an exception IllegaThreadState as it tries to start the thread again from within the following method: /* * Callback invoked when the Surface has been created and is ready to be * used. */ public void surfaceCreated(SurfaceHolder holder) { // start the thread here so that we don't busy-wait in run() // waiting for the surface to be created thread.setRunning(true); thread.start(); } I have tried to check if the thread is running with thread.isAlive() ==false but it appears that when the activity loses focus the thread returns false for that call. Any suggestions on what I could do to prevent such exception? I've tried try/catch but I am unsure on what to call on the exception. Any help much appreciated, Cass Surek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: EditText not honoring width attribute
Unfortunately The layout is honored such that all of the EditText fields expand so that all of them are as big as the largest 1. That is exactly the purpose of TableLayout. If you do not want this behavior, do not use TableLayout. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---