[android-developers] Re: orientation changes for layouts

2009-10-18 Thread Spektor Yaron
Thanks for the reply,sorry for the delayed response that will only work if i want to create a view. but what if the view is the same and i want to attached a dynamically created object from the layout, for example a new keyboard inside a view. you switch the keyboard using the new layout but th

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Mark Murphy
Spektor Yaron wrote: > Thanks again, > so i went ahead and implemented that and then found out that this: > public XmlResourceParser getXml(int id) throws NotFoundException { > return loadXmlResourceParser(id, "xml"); > } > > does not find the resource id if the layout is in layout-land

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Spektor Yaron
Thanks again, so i went ahead and implemented that and then found out that this: public XmlResourceParser getXml(int id) throws NotFoundException { return loadXmlResourceParser(id, "xml"); } does not find the resource id if the layout is in layout-land (it does find it if it is in layout

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Mark Murphy
Spektor Yaron wrote: > Thanks got it, > but the point still is that Android would not know that layout3 and > layout1 are the same and so if i am in layout3 it will not switch to > layout1 when an orientation change occurs, right? Correct. Android does not support the notion of accessing two res

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Spektor Yaron
Thanks got it, but the point still is that Android would not know that layout3 and layout1 are the same and so if i am in layout3 it will not switch to layout1 when an orientation change occurs, right? On Sat, Oct 17, 2009 at 12:25 AM, Mark Murphy wrote: > > Spektor Yaron wrote: > > by calling th

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Mark Murphy
Spektor Yaron wrote: > by calling the layout-land "layout3" i loose the android built-in method > to switch to it when the orientation changes. That is not what I wrote. Copy layout/layout1 to layout/layout3. Then, all three are available under unique identifiers. You still have a landscape lay

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Spektor Yaron
Thanks, by calling the layout-land "layout3" i loose the android built-in method to switch to it when the orientation changes. that is why i added a proposed solution for that - call the get getResources().getConfiguration().orientation myself and figure out which layout to switch to. are you sayin

[android-developers] Re: orientation changes for layouts

2009-10-16 Thread Mark Murphy
Spektor Yaron wrote: > i have a layout folder with 2 layouts. layout1 and layout2 > i have another folder layout-land that has layout1 in it. > i would like to be able to get to all the layouts so i could create a > set of layout like this: > {layout1, layout2, layout1(from layout-land folder)} >