[android-developers] Re: activity launches with wrong layout orientation
you should have instead placed the layout files in layout and layout-
land.
I assume that you must be updating the layout in just onCreate and
onConfigurationChanged method. But, you should also check for the
configuration and update it in onResume.
Its better to use the folders if there isnt any specific reason to the
way you are doing.
On Oct 9, 11:50 am, Goodwin <purerain2...@163.com> wrote:
> I never find this issue. maybe you could supply more code.
>
> On Oct 7, 8:50 pm, Simon <simon.wilkin...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I have an activity that I have two layouts defined for: one for
> > landscape and one for portrait. So in my layout folder I have
> > activity.xml and activity_landscape.xml. When I am switching around
> > orientation on my device the proper layout is loading on orientation
> > change. However, if I am in landscape mode, and then launch this
> > activity from another activity, the portrait layout is rendered, even
> > though the device is in landscape mode. I am launching the activity
> > using the following:
>
> > Intent i = new Intent(OtherActivity.this, Activity.class);
> > startActivityForResult(i, ACTIVITY_X);
>
> > Does anybody have any ideas for why this could be happening? Seems
> > strange that it would work except for on initial load of the activity.
>
> > Thanks,
>
> > Simon
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home