Re: [android-developers] Portrait Inflate problem

2010-07-24 Thread YuviDroid
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

Re: [android-developers] Portrait Inflate problem

2010-07-24 Thread Alex Xin
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

Re: [android-developers] Portrait Inflate problem

2010-07-24 Thread YuviDroid
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

[android-developers] Portrait Inflate problem

2010-07-23 Thread Alex Xin
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

Re: [android-developers] Portrait Inflate problem

2010-07-23 Thread TreKing
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?

Re: [android-developers] Portrait Inflate problem

2010-07-23 Thread Alex Xin
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

Re: [android-developers] Portrait Inflate problem

2010-07-23 Thread Alex Xin
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