Thanks Flo for quick reply.

In my case the landscape layout files have no changes they are as same
as portrait, that's why i haven't created a separate landscape folder
for layout(layout_land). So on change of orientation the android will
pick the file from layout folder only.

My confusion shall I handle onConfigurationChange for orientation
which will stop android to create a new activity or i should not
handle onConfigurationChange and let android do the life cycle process
complete.

Thanks

On Oct 14, 2:27 pm, Flo <florian.bernst...@gmail.com> wrote:
> Let Android handle it.
>
> Just create a second layout folder called "layout-land" and put all
> your landscape layouts in. The layouts must have the same file name
> like the layouts in the normal "layout" folder for portrait mode.
> Android will pick the right folder to get the layout from. On
> landscape mode it will take the layouts from the "layout-land" folder
> and in portrait mode it will take the layouts from the "layout"
> folder.
>
> On Oct 14, 11:11 am, nikki <nikhileshsingh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I am a bit confused on setting up my screen UI. The point of confusion
> > is I am having similar UI layout file for landscape and portrait. On
> > screen orientation change shall i handle onConfigurationChange or i
> > should let android do the complete activity life cycle and recreating
> > the UI by setContentView().
>
> > Please suggest which one is the best optimized approach.
>
> > Thanks in adavance

-- 
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

Reply via email to