Re: [android-developers] Portrait Inflate problem
When you specify orientation in configChanges you are telling the OS not to deal with orientation changes in your activity. Therefore, when you now rotate the phone you activity will not be recreated and the layout file will not be inflated again. On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote: Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Hi YuviDroid So this method is just a workround? I still need to find out why my app will crash while orientation changes? On Sat, Jul 24, 2010 at 5:02 PM, YuviDroid yuvidr...@gmail.com wrote: When you specify orientation in configChanges you are telling the OS not to deal with orientation changes in your activity. Therefore, when you now rotate the phone you activity will not be recreated and the layout file will not be inflated again. On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote: Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Well, if your app works fine with this then it should be ok ;) Still, it would be interesting to understand what's causing the crash.. On Sat, Jul 24, 2010 at 11:11 AM, Alex Xin xinxi...@gmail.com wrote: Hi YuviDroid So this method is just a workround? I still need to find out why my app will crash while orientation changes? On Sat, Jul 24, 2010 at 5:02 PM, YuviDroid yuvidr...@gmail.com wrote: When you specify orientation in configChanges you are telling the OS not to deal with orientation changes in your activity. Therefore, when you now rotate the phone you activity will not be recreated and the layout file will not be inflated again. On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote: Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Portrait Inflate problem
Hi, I've met a very strange issue that my app will crash if user first switch to landscape, then back to portrait. I found that Activity.setContentView() will throw an inflate exception. It said: android.view.InflateException: Binary XML file line #29: Error inflating class unknown This crash will happens on Android 1.6/2.1/2.1-update1, but doesn't happen in 2.2 Froyo. In Froyo, everything works fine. If the XML I used is invalid, it should happens every time when I try to inflate. But why it's okay on the first time of running and switching to landscape? This also only happens on some devices. For example, there two HTC G1 with same software installed on it and has the same configuration, one has this issue and the other one works fine. Could someone help me? I really don't know how to start to solve this issue? Thanks very much! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en