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